Command

Command provides a simple way to execute backing bean methods with javascript.

You can also make the command run when the DOM is ready by setting onload="true".

Example
Documentation

                    <h:form>
                    <t:message/>
                    <t:command name="mycommand" action="#{controller.runCommand}"/>
                    </h:form>

                    <button onclick="mycommand()">Run mycommand</button>

Command provides a simple way to execute backing bean methods with javascript.

Info
Tag name command
Component type io.tornadofaces.component.Command
Renderer type io.tornadofaces.component.CommandRenderer
Attributes
NameDescriptionRequired
nameThe name of the client method that will execute the action.true
delayNumber of milliseconds delay before the command is executed when called.false
repeatOnReloadRepeat the command if onload is true and the component is rendered multiple times.false
onloadExecute the action on DOM load. Defaults to false.false
actionThe action to call when the command is invokedfalse
actionListenerThe action listener to call when the command is invokedfalse
immediateInvoke the action in the Apply Request Values phase. Defaults to false.false
renderSpace separated list of components to render after ajax. Default "@form".false
executeSpace separated list of components to execute on ajax. Default "@form".false
beforebeginJavaScript callback triggered before the AJAX event is assembled. Return false to cancel request.false
oncompleteJavaScript callback triggered before the AJAX request is sentfalse
oncompleteJavaScript callback triggered after AJAX response has arrivedfalse
onsuccessJavaScript callback triggered after DOM update based on AJAX requestfalse
renderedShould this component be rendered?false