Copyright © 2009-2021 Marc Worrell
Authors: Marc Worrell (marc@worrell.nl), Rusty Klophaus.
ctx_rs() = render_state() | z:context()
html_element_id() = binary() | string() | undefined
render_state() = #render_state{updates = list(), actions = list(), content_scripts = list(), scripts = list(), wire = list(), validators = list(), render = list()}
add_script/2 | |
appear/3 | Set the contents of an element to the the html fragment. |
appear_after/3 | Add a html after the target element. |
appear_after_selector/3 | |
appear_after_selector_js/2 | |
appear_before/3 | Append a html fragment at the bottom of the contents of an element. |
appear_before_selector/3 | |
appear_before_selector_js/2 | |
appear_bottom/3 | Append a html fragment at the bottom of the contents of an element. |
appear_bottom_selector/3 | |
appear_bottom_selector_js/2 | |
appear_replace/3 | |
appear_replace_selector/3 | |
appear_replace_selector_js/2 | |
appear_selector/3 | |
appear_selector_js/2 | |
appear_top/3 | Insert a html fragment at the top of the contents of an element. |
appear_top_selector/3 | |
appear_top_selector_js/2 | |
clean/1 | Remove all scripts from the context, resetting it back to a clean sheet. |
css_selector/1 | Map a target id to a css selector. |
css_selector/2 | Map a target id to a css selector, check the Args proplist for additional selectors. |
dialog/4 | |
dialog_close/1 | |
get_script/1 | Collect all scripts in the context, returns an iolist with javascript. |
growl/2 | |
growl/4 | |
growl_error/2 | |
insert_after/3 | Add a html after the target element. |
insert_after_selector/3 | |
insert_after_selector_js/2 | |
insert_before/3 | Add a html before the target element. |
insert_before_selector/3 | |
insert_before_selector_js/2 | |
insert_bottom/3 | Append a html fragment at the bottom of the contents of an element. |
insert_bottom_selector/3 | |
insert_bottom_selector_js/2 | |
insert_top/3 | Insert a html fragment at the top of the contents of an element. |
insert_top_selector/3 | |
insert_top_selector_js/2 | |
make_postback/6 | Make a javascript to call the postback, posting an encoded string containing callback information. |
make_postback/7 | |
make_postback_info/6 | Make an encoded string containing information which module and function to call. |
make_validation_postback/2 | |
make_validation_postback/3 | |
output/2 | Replace the placeholders with their rendered content and collect all scripts from the mixed html and context. |
overlay/3 | |
overlay_close/1 | |
quote_css_selector/1 | Quote a css selector (assume no escaping needed...). |
render/2 | Render adds output to the render-state of the context. |
render_actions/4 | |
render_css_selector/1 | Render a css selector, allow direct expressions like. |
render_html/2 | |
render_to_iolist/2 | Render adds output to the render field of the context state. |
render_to_iolist/3 | |
render_validator/4 | Render a validator to the correct javascript. |
replace/3 | Replace an element to the the html fragment. |
replace_selector/3 | |
replace_selector_js/2 | |
set_value/3 | Set the value of an input element. |
set_value_selector/3 | |
update/3 | Set the contents of an element to the the html fragment. |
update_iframe/3 | Set the contents of an iframe to the generated html. |
update_selector/3 | Set the contents of all elements matching the css selector to the the html fragment. |
update_selector_js/2 | Set the contents of all elements matching the css selector to the the html fragment. |
validator/4 | Add an input validator to the list of known validators, used when rendering custom validators. |
wire/2 | |
wire/3 | |
wire/4 |
add_script(Script, Context) -> any()
appear(TargetId, Html, Context) -> any()
Set the contents of an element to the the html fragment
appear_after(TargetId, Html, Context) -> any()
Add a html after the target element
appear_after_selector(CssSelector, Html, Context) -> any()
appear_after_selector_js(CssSelector, Html) -> any()
appear_before(TargetId, Html, Context) -> any()
Append a html fragment at the bottom of the contents of an element
appear_before_selector(CssSelector, Html, Context) -> any()
appear_before_selector_js(CssSelector, Html) -> any()
appear_bottom(TargetId, Html, Context) -> any()
Append a html fragment at the bottom of the contents of an element
appear_bottom_selector(CssSelector, Html, Context) -> any()
appear_bottom_selector_js(CssSelector, Html) -> any()
appear_replace(TargetId, Html, Context) -> any()
appear_replace_selector(CssSelector, Html, Context) -> any()
appear_replace_selector_js(CssSelector, Html) -> any()
appear_selector(CssSelector, Html, Context) -> any()
appear_selector_js(CssSelector, Html) -> any()
appear_top(TargetId, Html, Context) -> any()
Insert a html fragment at the top of the contents of an element
appear_top_selector(CssSelector, Html, Context) -> any()
appear_top_selector_js(CssSelector, Html) -> any()
clean(Context::z:context()) -> z:context()
Remove all scripts from the context, resetting it back to a clean sheet.
css_selector(TargetId) -> any()
Map a target id to a css selector
css_selector(TargetId, Args) -> any()
Map a target id to a css selector, check the Args proplist for additional selectors
dialog(Title, Template, Vars, Context) -> any()
dialog_close(Context) -> any()
get_script(Context::z:context()) -> iolist()
Collect all scripts in the context, returns an iolist with javascript.
growl(Text, Context) -> any()
growl(Text, Type, Stay, Context) -> any()
growl_error(Text, Context) -> any()
insert_after(TargetId, Html, Context) -> any()
Add a html after the target element
insert_after_selector(CssSelector, Html, Context) -> any()
insert_after_selector_js(CssSelector, Html) -> any()
insert_before(TargetId, Html, Context) -> any()
Add a html before the target element
insert_before_selector(CssSelector, Html, Context) -> any()
insert_before_selector_js(CssSelector, Html) -> any()
insert_bottom(TargetId, Html, Context) -> any()
Append a html fragment at the bottom of the contents of an element
insert_bottom_selector(CssSelector, Html, Context) -> any()
insert_bottom_selector_js(CssSelector, Html) -> any()
insert_top(TargetId, Html, Context) -> any()
Insert a html fragment at the top of the contents of an element
insert_top_selector(CssSelector, Html, Context) -> any()
insert_top_selector_js(CssSelector, Html) -> any()
make_postback(PostbackTag, EventType, TriggerId, TargetId, Delegate, Context) -> {JavascriptString, PickledPostback}
Make a javascript to call the postback, posting an encoded string containing callback information. The PostbackTag is send to the server, EventType is normally the atom 'postback'.
make_postback(PostbackTag, EventType, TriggerId, TargetId, Delegate, QArgs, Context) -> any()
make_postback_info(Tag, EventType, TriggerId, TargetId, Delegate, Context) -> any()
Make an encoded string containing information which module and function to call.
make_validation_postback(Validator, Context) -> any()
make_validation_postback(Validator, Args, Context) -> any()
output(MixedHtml::term(), Context::z:context()) -> {iolist(), z:context()}
Replace the placeholders with their rendered content and collect all scripts from the mixed html and context. The result is a clean HTML tree and can be used for return by controllers.
overlay(Template, Vars, Context) -> any()
overlay_close(Context) -> any()
quote_css_selector(S) -> any()
Quote a css selector (assume no escaping needed...)
render(Mixed::term(), Context::z:context()) -> z:context()
Render adds output to the render-state of the context. Makes sure that the added output is an iolist The stored render state is later used in output/2
render_actions(TriggerId::html_element_id(), TargetId::html_element_id(), T::list(), Context::z:context()) -> {iolist(), z:context()}
render_css_selector(Selector) -> any()
Render a css selector, allow direct expressions like
render_html(Render, Context) -> any()
render_to_iolist(MixedHtml::term(), Context::z:context()) -> {iolist(), z:context()}
Render adds output to the render field of the context state. Do update the context for possible changes in scripts etc.
render_to_iolist(Template::term(), Vars::list(), Context::z:context()) -> {iolist(), z:context()}
render_validator(TriggerId::undefined | binary(), TargetId::undefined | binary(), Args::list(), Context::z:context()) -> iolist()
Render a validator to the correct javascript. Args are all arguments of the validator scomp. This renders an allocation of the initial validator and then appends all validations. 'type' holds multiple validations. Validations are of the form: {validator, [Args]}
replace(TargetId, Html, Context) -> any()
Replace an element to the the html fragment
replace_selector(CssSelector, Html, Context) -> any()
replace_selector_js(CssSelector, Html) -> any()
set_value(TargetId, Value, Context) -> any()
Set the value of an input element.
set_value_selector(CssSelector, Value, Context) -> any()
update(TargetId::string() | binary(), Html::#render{} | iodata(), Context::z:context()) -> z:context()
Set the contents of an element to the the html fragment
update_iframe(IFrameId, Html, Context) -> any()
Set the contents of an iframe to the generated html.
update_selector(CssSelector, Html, Context) -> any()
Set the contents of all elements matching the css selector to the the html fragment
update_selector_js(CssSelector, Html) -> any()
Set the contents of all elements matching the css selector to the the html fragment
validator(TriggerID::string(), TargetID::string(), Validator::#validator{}, Context::#context{}) -> #context{}
Add an input validator to the list of known validators, used when rendering custom validators
wire(TriggerId, Actions, Context) -> any()
wire(TriggerId, TargetId, Actions, Context) -> any()
Generated by EDoc