public interface UIAtomicWidget extends UIWidget
Modifier and Type | Method and Description |
---|---|
JsFunctionCall |
getActionOnAfterValueChanged() |
boolean |
isAjaxPrevalidationEnabled() |
boolean |
isAjaxValueSynchEnabled() |
void |
setActionOnAfterValueChanged(JsFunctionCall aFunctionToBeCalled)
Sets an action on the client-side that is triggered
after the user has changed the value of the component.
|
void |
setAjaxPrevalidationEnabled(boolean isEnabled)
Ajax value prevalidation sends the value entered by the user to the server,
usually when the focus leaves the field; then the constraints defined by the field
are checked and the validation messages are raised automatically on the screen near the field.
|
void |
setAjaxValueSynchEnabled(boolean isEnabled)
Ajax value synchronization sends the value entered by the user to the server,
usually when the focus leaves the field.
|
isEditorDisabled, setEditorDisabled
JsFunctionCall getActionOnAfterValueChanged()
void setActionOnAfterValueChanged(JsFunctionCall aFunctionToBeCalled)
When the action is triggered, the JavaScript function is called as follows:
<myFunction>(<val> [, <myArg>]);
, where <myFunction>
is the name of aFunctionToBeCalled
and <val>
is the value of the field; its type and format depend
on the widget's class and is documented in the widget's Javadoc, under the section 'JavaScript type'.
The second argument <myArg>
is optional and
is passed as a parameter only if specified by aFunctionToBeCalled
.
Note: If the Ajax prevalidation is enabled for the component, the action is triggered after the confirmation of the Ajax prevalidation (and it may take some time). The triggering event is not directly related to a particular HTML event.
aFunctionToBeCalled
- the JavaScript function to be called after the user
has changed the value of the component.boolean isAjaxPrevalidationEnabled()
true
if the Ajax prevalidation is enabled,
false
otherwise.setAjaxPrevalidationEnabled(boolean)
boolean isAjaxValueSynchEnabled()
true
if the value synchronization is enabled,
false
otherwise.setAjaxPrevalidationEnabled(boolean)
void setAjaxPrevalidationEnabled(boolean isEnabled)
Data entered by the user are kept in a temporary context on the server. This method does not persist the data.
Default value is true
except if called in a UIBean.
If set to false, it will also disable the value synchronization.
If set to true, it will also enable the value synchronization.
isEnabled
- enables Ajax prevalidation so as to automatically display
validation error messages on the page.setAjaxValueSynchEnabled(boolean)
void setAjaxValueSynchEnabled(boolean isEnabled)
The difference with setAjaxPrevalidationEnabled(boolean)
is that the node constraints are not checked.
Data entered by the user are kept in a temporary context on the server. This method does not persist the data.
Default value is true
.
If set to false, it will also disable the Ajax prevalidation.
If set to true, it will not re-enable the Ajax prevalidation if it had previously been disabled.
isEnabled
- enables Ajax value synchronization so as to automatically display
formatting error messages on the page.setAjaxPrevalidationEnabled(boolean)