Interface UIAtomicWidget
- All Superinterfaces:
UIWidget
- All Known Subinterfaces:
UIAtomicWithEnumeration
,UIAtomicWithEnumerationItem
,UICheckBox
,UICheckBoxGroup
,UIColorPicker
,UIComboBox
,UIDatasetSelector
,UIDataspaceSelector
,UIDateTime
,UIDropDownList
,UIListBox
,UIPassword
,UIRadioButton
,UIRadioButtonGroup
,UITextBox
- Since:
- 5.3.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
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.Methods inherited from interface com.orchestranetworks.ui.form.widget.UIWidget
isEditorDisabled, setEditorDisabled
-
Method Details
-
getActionOnAfterValueChanged
JsFunctionCall getActionOnAfterValueChanged() -
setActionOnAfterValueChanged
Sets an action on the client-side that is triggered after the user has changed the value of the component.When the action is triggered, the JavaScript function is called as follows:
<myFunction>(<val> [, <myArg>]);
, where
<myFunction>
is the name ofaFunctionToBeCalled
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 byaFunctionToBeCalled
.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.
- Parameters:
aFunctionToBeCalled
- the JavaScript function to be called after the user has changed the value of the component.
-
isAjaxPrevalidationEnabled
boolean isAjaxPrevalidationEnabled()- Returns:
true
if the Ajax prevalidation is enabled,false
otherwise.- See Also:
-
isAjaxValueSynchEnabled
boolean isAjaxValueSynchEnabled()- Returns:
true
if the value synchronization is enabled,false
otherwise.- Since:
- 5.5.0
- See Also:
-
setAjaxPrevalidationEnabled
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.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.
- Parameters:
isEnabled
- enables Ajax prevalidation so as to automatically display validation error messages on the page.- See Also:
-
setAjaxValueSynchEnabled
void setAjaxValueSynchEnabled(boolean isEnabled) Ajax value synchronization sends the value entered by the user to the server, usually when the focus leaves the field. Then the new value is parsed to be converted to the field datatype. If the value cannot be parsed, messages are displayed automatically on the screen near the field.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.
- Parameters:
isEnabled
- enables Ajax value synchronization so as to automatically display formatting error messages on the page.- Since:
- 5.5.0
- See Also:
-