The RSF UICommand is a primitive component for a user control that will cause a non-idempotent (action request to the server. In plain HTML/HTTP terms, a UICommand is expected to peer with a tag <input type="submit"> which will give rise to a POST request.
The full complement of arguments to the UICommand 'pseudoconstructor' make are
- parent The parent component to which this action link will be added as a child.
- ID The rsf:id|IDs of this component
- text The text that will be rendered to the user on this component.
- methodbinding An RSF EL expression representing the method binding - a reference to the action to be triggered when the user activates this link.
The text argument may be either a literal String or a UIBoundString (typically a UIMessage) representing the text to be rendered on the control. If text is left null, this component can be used in the template as a composite leaf.
Example#
Here is an example showing a use of the fullest UICommand constructor
UIForm startEvalForm = UIForm.make(tofill, "begin-evaluation-form"); UICommand.make(startEvalForm, "begin-evaluation-link", UIMessage.make("starteval.page.title"), "#{evaluationBean.startEvaluation}");
Note that the resulting navigation from a UICommand control will be controlled by the RSF ActionResultInterpreter/ActionResultInterceptor - which at the user level is most typically represented by the NavigationCase system.