|
MoreMotion Face API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--MoreMotionObject
|
+--ProcessField
Represents a Process Field.
Defined in Process.js
| Field Summary | |
Object |
elm
|
Boolean |
needsValueCloning
This flag denotes that the value of this field should be set additionally by calling the setValue() method after the process record that this field resides in is cloned. |
Object |
props
ProcessField Properties Object |
| Fields inherited from class MoreMotionObject |
node, name, type, props
|
| Constructor Summary | |
ProcessField(node)
|
|
| Method Summary | |
void
|
appendRequestParams(acc,prefix)
Appends the request parameters and their values to the given request parameter accumulator. |
Boolean
|
checkHasValidValue(elmToValidate,elmToFocus)
Checks if this Process Field has a valid value. |
Boolean
|
checkValueIsAvailable(elmToValidate,elmToFocus)
Checks if this Process Field has a value. |
Boolean
|
checkValueIsNumber(elmToValidate,elmToFocus)
Checks if the value of this Process Field is a valid number. |
void
|
clear()
Clears the value of this Process Field. |
void
|
focusTab()
If this Process Field is located in a TabPanel this method instructs the TabManager to focus to that Tab. |
Object
|
getCaption()
Returns the caption of this field |
ProcessRecord
|
getRecord()
Returns the Process Record that this Process Field resides in |
Object
|
getValue()
Returns the value of this field |
Boolean
|
isModified()
Returns true if this Process Field is modified by the user
false otherwise.
|
Boolean
|
notify(elm, msgCode, msgArg1, msgArg2, msgArg3)
Focuses on the specified HTML Element and notifies the user with the specified message. |
Boolean
|
notifyEx(elm, ex)
Focuses on the specified HTML Element and notifies the user with the specified message. |
void
|
reset(silent)
Resets the value of this Process Field. |
Boolean
|
runValidationHandler()
Runs the Validation Handler Function defined for this Process Field. |
void
|
setModified()
Adds the name of this field to the modified fields list of the parent ProcessRecord if the value of this field is different that the initial value. |
void
|
setValue(value)
Sets the value of this field. |
Boolean
|
validate()
Validates this Process Field with the built-in validation methods that are applicable to the type of the Process Field. |
| Methods inherited from class MoreMotionObject |
saveProps, setProp, boolProp, numberProp, charProp, getIValue, setIValue, runHandler
|
| Field Detail |
Object elm
Boolean needsValueCloning
HTML SELECT elements
Object props
| nonBlank | Flag that specifies that this field must contain a value |
| isNumber | Flag that specifies that this field must contain a valid number |
| validValues | The valid values that can be entered into this Process Field. The values should be separated with ";" characters. e.g. "AAA;BBB;CCC". If the value of this Process Field is number then number ranges can be defined. e.g. "1:20;30:40". |
| valHandler | The name of the Validation Handler Function.
If this property is defined then it is called by the validate() method of this object
and this object is passed to it as the parameter.
Example:
function MyValidationHandler(field) {
if (field.elm.value.indexOf("x") == -1) {
alert("Error!")
return false;
}
return true;
}
|
| valErrorHandler | The name of the event handler function. If this property is present and
if the validation of this Process Field fails then this handler is invoked to handle the error and an Exception object passed to it.
The handler should return normally if it handles the error or throw the Exception object.
Example:
function MyErrorHandler(ex) {
if (ex.code == "CANNOT_BE_BLANK") return;
throw ex;
}
|
| Constructor Detail |
ProcessField(node)
node - the DOM Element node that is wrapped by this field
| Method Detail |
void appendRequestParams(acc,prefix)
This method is called prior to the submit of the request either with Ajax or with regular Http. Depending on the type of the process field one or more request parameters can be appended to the parameter accumulator.
acc - The RequestParameterAccumulator object
prefix - The prefix to be put in front of the parameter name(s)
Boolean checkHasValidValue(elmToValidate,elmToFocus)
elmToValidate - The HTML Element object whose value to be checked
elmToFocus - The HTML Element object to focus when validation fails
true is the validation is successful false otherwise.
Boolean checkValueIsAvailable(elmToValidate,elmToFocus)
elmToValidate - The HTML Element object whose value to be checked
elmToFocus - The HTML Element object to focus when validation fails
true is the validation is successful false otherwise.
Boolean checkValueIsNumber(elmToValidate,elmToFocus)
elmToValidate - The HTML Element object whose value to be checked
elmToFocus - The HTML Element object to focus when validation fails
true is the validation is successful false otherwise.
void clear()
void focusTab()
Object getCaption()
ProcessRecord getRecord()
Object getValue()
Boolean isModified()
true if this Process Field is modified by the user
false otherwise.Boolean notify(elm, msgCode, msgArg1, msgArg2, msgArg3)
elm - The HTML Element object to focus
msgCode - The message code
msgArg1 - The message argument 1
msgArg2 - The message argument 2
msgArg3 - The message argument 3
true if valErrorHandler property is defined and the error handler covered the error false otherwise.
Boolean notifyEx(elm, ex)
elm - The HTML Element object to focus
ex - The Exception to notify
true if valErrorHandler property is defined and the error handler covered the error false otherwise.
void reset(silent)
silent - Boolean value true if there is no change in the modification status of the field
Boolean runValidationHandler()
true is the validation is successful false otherwise.
void setModified()
void setValue(value)
value - The value to set to the field.
Boolean validate()
|
MoreMotion Face API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||