Class SweetDevRia.Mandatory
Extends
RiaComponent, RiaComponent.
Defined in: Mandatory.js.
Constructor Attributes | Constructor Name and Description |
---|---|
This is the Mandatory component class
|
Method Attributes | Method Name and Description |
---|---|
addMandatoryId(id, messageConf)
Add an mandatory component identifiant
|
|
Clear all error messages
|
|
<private> |
displayErrors(errorIds)
Display all error messages
|
<static> |
SweetDevRia.Mandatory.getFormControl(formId)
Return all Mandatory controls associated with a formular id.
|
<private> |
This method is automatically called at the page load
|
Test if all mandatory components are not null.
|
|
<private> |
onControlListener(evt, mandatory)
call control method and stop event propagation if the form does't be submitted
|
<static> |
SweetDevRia.Mandatory.testFormMandatory(formId)
Test if formular all mandatory constraints are respected
|
Class Detail
SweetDevRia.Mandatory(id)
This is the Mandatory component class
- Parameters:
- {String} id
- Id of this mandatory
Method Detail
addMandatoryId(id, messageConf)
Add an mandatory component identifiant
- Parameters:
- {String} id
- New mandatory component identifiant
- {Array} messageConf
- Optionnal error messages configuration. ex :[["loginMessage", null, true, false], ["globalMessage", "Votre identifiant est inconnu !", true, true]]
clearErrors()
Clear all error messages
<private>
displayErrors(errorIds)
Display all error messages
- Parameters:
- {Array} errorIds
- Component identifiants on error
<static>
{Array}
SweetDevRia.Mandatory.getFormControl(formId)
Return all Mandatory controls associated with a formular id.
- Parameters:
- {String} formId
- formular id to search
- Returns:
- All mandatory controls associated with a formular id.
<private>
initialize()
This method is automatically called at the page load
{boolean}
onControl()
Test if all mandatory components are not null.
- Returns:
- true if mandatory rules are ok, else false
<private>
onControlListener(evt, mandatory)
call control method and stop event propagation if the form does't be submitted
- Parameters:
- {Event} evt
- {SweetDevRia.Mandatory} mandatory
<static>
{boolean}
SweetDevRia.Mandatory.testFormMandatory(formId)
Test if formular all mandatory constraints are respected
- Parameters:
- {String} formId
- formulare id to test
- Returns:
- true if formular all mandatory constraints are respected, else false