Class Index | File Index

Classes


Class SweetDevRia.Control


Extends RiaComponent, RiaComponent.

Defined in: Control.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
This is the Control component class
Method Summary
Method Attributes Method Name and Description
 
addAction(action, RegExp, condition, param)
Optional, add an action to executed on target component if the control is ok.
 
addActionElse(action, RegExp, condition, param)
Optional, add an action to executed on target component if the control is not ok.
<private>  
Add the change handler which will control the component value after a user action
 
afterExecuteActions(id, value, actions)
This method is called after execute actions.
 
afterLoadData(comp, data)
This method is called after Load data in a component.
 
This method is called after Reset the component value To be overridden !!
 
afterSetComponentDisable(comp, disable)
This method is called after Disable a component To be overridden !!
 
afterSetComponentVisibility(comp, visibility)
This method is called after set the visibility of a component To be overridden !!
 
afterSetErrorMode(id, errorMode)
This method is called after Put an error style on source component To be overridden !!
 
afterSetValue(comp, value)
This method is called after Set the value of a component value To be overridden !!
 
afterTestValue(id, value)
This method is called after Test a component value To be overridden !!
 
applyErrorClasses(srcId, errorMode)
Apply or remove the component error class and the label error class
 
beforeExecuteActions(id, value, actions)
This method is called before execute actions.
 
beforeLoadData(comp, data)
This method is called before Load data in a component.
 
This method is called before Reset the component value To be overridden !!
 
This method is called before Disable a component To be overridden !!
 
beforeSetComponentVisibility(comp, visibility)
This method is called before set the visibility of a component To be overridden !!
 
beforeSetErrorMode(id, errorMode)
This method is called before Put an error style on source component To be overridden !!
 
beforeSetValue(comp, value)
This method is called before Set the value of a component value To be overridden !!
 
beforeTestValue(id, value)
This method is called before Test a component value To be overridden !!
<private>  
control(targetId)
This method test the source component value
 
This method launch the whole tests packed into this control component
<private>  
executeActions(id, value, actions)
This method execute action.
<private>  
This method is automatically called at the page load
<private>  
loadData(comp, data)
Load data in a component.
<private>  
onControl(evt, control)
This method test the source component value
<private>  
Reset the component value
 
setCanBeEmpty(canBeEmpty)
Indicate if this component value can be empty or not
<private>  
setComponentDisable(comp, disable)
Disable a component
<private>  
setComponentVisibility(comp, visibility)
set the visibility of a component
<private>  
setErrorMode(id, errorMode, messageConf)
Put an error style on source component
 
setEventTrigger(formType, event)
Set the event triggering the action for a certain kind of component Must be called before the page load Call updateEventTrigger to change it at runtime, after the page finished loading Default is : SweetDevRia.Form.INPUT_TYPE : blur SweetDevRia.Form.TEXTAREA_TYPE : blur SweetDevRia.Form.SELECT_TYPE : change SweetDevRia.Form.RADIO_TYPE : click SweetDevRia.Form.CHECKBOX_TYPE : click SweetDevRia.Form.RIA_CALENDAR_TYPE : change SweetDevRia.Form.RIA_SUGGEST_TYPE : change
 
setFunctionTest(functionTest, messageConf)
Set the client Function test.
 
setHandler(handler)
Set an handler.
 
setSrcIds(srcIds)
Set the source identifiers
 
setTest(test, messageConf)
Set the test to valid the source component value.
 
setTestClass(testClass, messageConf)
Set the test class.
<private>  
setValue(comp, value)
Set the value of a component value
<private>  
testValue(id, value)
Test a component value
 
updateEventTrigger(formType, event, remove)
Update the change handler which will control the component value after a user action This update has to be processed before the page load finished Call setEventTrigger to change it at loadtime, before any event binding has been performed Default is : SweetDevRia.Form.INPUT_TYPE : blur SweetDevRia.Form.TEXTAREA_TYPE : blur SweetDevRia.Form.SELECT_TYPE : change SweetDevRia.Form.RADIO_TYPE : click SweetDevRia.Form.CHECKBOX_TYPE : click SweetDevRia.Form.RIA_CALENDAR_TYPE : change SweetDevRia.Form.RIA_SUGGEST_TYPE : change
Class Detail
SweetDevRia.Control(id)
This is the Control component class
Parameters:
{String} id
Id of this table
Method Detail
addAction(action, RegExp, condition, param)
Optional, add an action to executed on target component if the control is ok.
Parameters:
{String} action
Optional action to executed on target component if the control is ok. Expected values are : hide, show, disable, enable, loadData
{String} RegExp
condition to execute this action.
condition
param

addActionElse(action, RegExp, condition, param)
Optional, add an action to executed on target component if the control is not ok.
Parameters:
{String} action
Optional action to executed on target component if the control is not ok. Expected values are : hide, show, disable, enable, loadData
{String} RegExp
condition to execute this action.
condition
param

<private> addOnChangeHandler()
Add the change handler which will control the component value after a user action

afterExecuteActions(id, value, actions)
This method is called after execute actions. To be overridden !!
Parameters:
{String} id
Identifiant of source component
{String} value
Source component value, used if exist an action condition
{array} actions
Actions to execute

afterLoadData(comp, data)
This method is called after Load data in a component. Used to modify select options. For all component types, it's call the setValue method. To be overridden !!
Parameters:
{component} comp
Component to modify
{Object} data
the new data

afterResetComponent(comp)
This method is called after Reset the component value To be overridden !!
Parameters:
{Component} comp
component to reset

afterSetComponentDisable(comp, disable)
This method is called after Disable a component To be overridden !!
Parameters:
{Component} comp
Component to disable
{boolean} disable
True to disable the component, else false

afterSetComponentVisibility(comp, visibility)
This method is called after set the visibility of a component To be overridden !!
Parameters:
{Component} comp
Component to set the visibility
{boolean} visibility
True to show the component, false to hide

afterSetErrorMode(id, errorMode)
This method is called after Put an error style on source component To be overridden !!
Parameters:
{String} id
Component identifiant on error
{boolean} errorMode
true to put an error style, else false

afterSetValue(comp, value)
This method is called after Set the value of a component value To be overridden !!
Parameters:
{component} comp
Component to set
{String} value
the new value to set

afterTestValue(id, value)
This method is called after Test a component value To be overridden !!
Parameters:
{String} id
Identifiant of component to test
{String} value
Value to test.

applyErrorClasses(srcId, errorMode)
Apply or remove the component error class and the label error class
Parameters:
{String} srcId
Component identifiant on error
{boolean} errorMode
True to apply css classes, false to remove it

{boolean} beforeExecuteActions(id, value, actions)
This method is called before execute actions. To be overridden !!
Parameters:
{String} id
Identifiant of source component
{String} value
Source component value, used if exist an action condition
{array} actions
Actions to execute
Returns:
True if this method can be called, else false.

{boolean} beforeLoadData(comp, data)
This method is called before Load data in a component. Used to modify select options. For all component types, it's call the setValue method. To be overridden !!
Parameters:
{component} comp
Component to modify
{Object} data
the new data
Returns:
True if this method can be called, else false.

{boolean} beforeResetComponent(comp)
This method is called before Reset the component value To be overridden !!
Parameters:
{Component} comp
component to reset
Returns:
True if this method can be called, else false.

{boolean} beforeSetComponentDisable(comp, disable)
This method is called before Disable a component To be overridden !!
Parameters:
{Component} comp
Component to disable
{boolean} disable
True to disable the component, else false
Returns:
True if this method can be called, else false.

{boolean} beforeSetComponentVisibility(comp, visibility)
This method is called before set the visibility of a component To be overridden !!
Parameters:
{Component} comp
Component to set the visibility
{boolean} visibility
True to show the component, false to hide
Returns:
True if this method can be called, else false.

{boolean} beforeSetErrorMode(id, errorMode)
This method is called before Put an error style on source component To be overridden !!
Parameters:
{String} id
Component identifiant on error
{boolean} errorMode
true to put an error style, else false
Returns:
True if this method can be called, else false.

{boolean} beforeSetValue(comp, value)
This method is called before Set the value of a component value To be overridden !!
Parameters:
{component} comp
Component to set
{String} value
the new value to set
Returns:
True if this method can be called, else false.

{boolean} beforeTestValue(id, value)
This method is called before Test a component value To be overridden !!
Parameters:
{String} id
Identifiant of component to test
{String} value
Value to test.
Returns:
True if this method can be called, else false.

<private> {boolean} control(targetId)
This method test the source component value
Parameters:
{String} targetId
Component identifiant to test
Returns:
True if control test are ok, else false

{boolean} controlAll()
This method launch the whole tests packed into this control component
Returns:
True if control tests are ok, false otherwise

<private> executeActions(id, value, actions)
This method execute action.
Parameters:
{String} id
Identifiant of source component
{String} value
Source component value, used if exist an action condition
{array} actions
Actions to execute

<private> initialize()
This method is automatically called at the page load

<private> loadData(comp, data)
Load data in a component. Used to modify select options. For all component types, it's call the setValue method.
Parameters:
{component} comp
Component to modify
{Object} data
the new data

<private> {boolean} onControl(evt, control)
This method test the source component value
Parameters:
{Event} evt
Mouse Event
{SweetDevRia.Control} control
Returns:
True if control test are ok, else false

<private> resetComponent(comp)
Reset the component value
Parameters:
{Component} comp
component to reset

setCanBeEmpty(canBeEmpty)
Indicate if this component value can be empty or not
Parameters:
{boolean} canBeEmpty
True if the component value can be empty, else false

<private> setComponentDisable(comp, disable)
Disable a component
Parameters:
{Component} comp
Component to disable
{boolean} disable
True to disable the component, else false

<private> setComponentVisibility(comp, visibility)
set the visibility of a component
Parameters:
{Component} comp
Component to set the visibility
{boolean} visibility
True to show the component, false to hide

<private> setErrorMode(id, errorMode, messageConf)
Put an error style on source component
Parameters:
{String} id
Component identifiant on error
{boolean} errorMode
true to put an error style, else false
{Array} messageConf
Optional error messages configuration. ex :[["loginMessage", null], ["globalMessage", "Votre identifiant est inconnu !"]]

setEventTrigger(formType, event)
Set the event triggering the action for a certain kind of component Must be called before the page load Call updateEventTrigger to change it at runtime, after the page finished loading Default is : SweetDevRia.Form.INPUT_TYPE : blur SweetDevRia.Form.TEXTAREA_TYPE : blur SweetDevRia.Form.SELECT_TYPE : change SweetDevRia.Form.RADIO_TYPE : click SweetDevRia.Form.CHECKBOX_TYPE : click SweetDevRia.Form.RIA_CALENDAR_TYPE : change SweetDevRia.Form.RIA_SUGGEST_TYPE : change
Parameters:
{int} formType
the type of the form element we set the trigger (ex: SweetDevRia.Form.SELECT_TYPE)
{String} event
the type of HTML event triggering the control (ex: "blur", "click")

setFunctionTest(functionTest, messageConf)
Set the client Function test. This method is called if mask test is ok, before call optional server test.
Parameters:
{Function} functionTest
client Function test. This method is called if mask test is ok, before call optional server test
{Array} messageConf
Optional error messages configuration. ex :[["loginMessage", null, true, false], ["globalMessage", "Votre identifiant est inconnu !", true, true]]

setHandler(handler)
Set an handler. An handler is a JavaScript function which will be called is the source component value is ok.
Parameters:
{Function} handler
JavaScript function which will be called is the source component value is ok.

setSrcIds(srcIds)
Set the source identifiers
Parameters:
{String} srcIds
Source component identifiers to control, ex : "id1,id2"

setTest(test, messageConf)
Set the test to valid the source component value. This test could be null if you declare a testClass for a value server test.
Parameters:
{String} test
RegExp to test the source component value. Any regexp are predefined : email, alpha, number, alphanumber, not null
{Array} messageConf
Optional error messages configuration. ex :[["loginMessage", null, true, false], ["globalMessage", "Votre identifiant est inconnu !", true, true]]

setTestClass(testClass, messageConf)
Set the test class. This server class is used to test the source component value validity. This attribute could be null if test attribute is not empty.
Parameters:
{String} testClass
Server test class.
{Array} messageConf
Optional error messages configuration. ex :[["loginMessage", null, true, false], ["globalMessage", "Votre identifiant est inconnu !", true, true]]

<private> setValue(comp, value)
Set the value of a component value
Parameters:
{component} comp
Component to set
{String} value
the new value to set

<private> {Array} testValue(id, value)
Test a component value
Parameters:
{String} id
Identifient of component to test
{String} value
Value to test.
Returns:
error messages configuration. ex :[["loginMessage", null, true, false], ["globalMessage", "Votre identifiant est inconnu !", true, true]] if in error, null esle

updateEventTrigger(formType, event, remove)
Update the change handler which will control the component value after a user action This update has to be processed before the page load finished Call setEventTrigger to change it at loadtime, before any event binding has been performed Default is : SweetDevRia.Form.INPUT_TYPE : blur SweetDevRia.Form.TEXTAREA_TYPE : blur SweetDevRia.Form.SELECT_TYPE : change SweetDevRia.Form.RADIO_TYPE : click SweetDevRia.Form.CHECKBOX_TYPE : click SweetDevRia.Form.RIA_CALENDAR_TYPE : change SweetDevRia.Form.RIA_SUGGEST_TYPE : change
Parameters:
{int} formType
the type of the form element we set the trigger (ex: SweetDevRia.Form.SELECT_TYPE)
{String} event
the type of HTML event triggering the control (ex: "blur", "click")
{boolean} remove
Optional whether the old event trigger must be removed (default is true)

Documentation generated by JsDoc Toolkit 2.0.0 on Thu May 05 2011 12:20:29 GMT+0200 (CEST)