|
Jala 1.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--jala.Form.Component.Input
Instances of this class represent a single form input field.
Defined in Form.js
Constructor Summary | |
jala.Form.Component.Input
(<String> name)
Creates a new input component instance. |
Method Summary | |
String
|
checkLength(<Object> reqData)
Checks user input for maximum length, minimum length and require if the corresponding options have been set using the require method. |
String
|
checkRequirements(<Object> reqData)
Checks user input against options set using the require method. |
void
|
class_macro()
Renders this component's class name. |
void
|
controls_macro()
Renders the control(s) of this component |
void
|
error_macro()
Renders this component's error message (if set) directly to response |
Object
|
getControlAttributes()
Creates a new attribute object for this element. |
String|Number|Date
|
getValue()
Retrieves the property which is edited by this component. |
void
|
help_macro()
Renders this component's help text, if set. |
void
|
id_macro()
Renders this component's id |
void
|
label_macro()
Renders this component's label. |
void
|
name_macro()
Renders this component's name |
Object
|
parseValue(<Object> reqData)
Parses the string input from the form and creates the datatype that is edited with this component. |
void
|
render()
Renders this component including label, error and help messages directly to response. |
void
|
render_macro()
Renders this component including label, error and help messages directly to response |
void
|
renderControls(<Object> attr, <Object> value, <Object> reqData)
Renders the html form elements to the response. |
String
|
renderError()
If the error tracker holds an error message for this component, it is wrapped in a div-tag and returned as a string. |
String
|
renderHelp()
If this component contains a help message, it is wrapped in a div-tag and returned as a string. |
String
|
renderLabel()
Returns the rendered label of this component |
void
|
save(<jala.Form.Tracker> tracker, <Object> destObj)
Saves the parsed value using setValue. |
Object
|
setValue(<Object> destObj, <Object> value)
Sets a property of the object passed as argument to the given value. |
void
|
type_macro()
Renders this component's type |
void
|
validate(<jala.Form.Tracker> tracker)
Validates the input provided to this component. |
Constructor Detail |
jala.Form.Component.Input(<String> name)
name
- Name of the component, used as name of the html control.
Method Detail |
String checkLength(<Object> reqData)
reqData
- request data
String checkRequirements(<Object> reqData)
reqData
- request data
void class_macro()
void controls_macro()
void error_macro()
Object getControlAttributes()
String|Number|Date getValue()
void help_macro()
void id_macro()
void label_macro()
void name_macro()
Object parseValue(<Object> reqData)
reqData
- request data
void render()
void render_macro()
void renderControls(<Object> attr, <Object> value, <Object> reqData)
attr
- Basic attributes for the html form elements.
value
- Value to be used for rendering this element.
reqData
- Request data for the whole form. This argument is passed only if the form is re-rendered after an error occured.
String renderError()
String renderHelp()
String renderLabel()
void save(<jala.Form.Tracker> tracker, <Object> destObj)
tracker
- Tracker object collecting request data, error messages and parsed values.
destObj
- (optional) object whose values will be changed.
Object setValue(<Object> destObj, <Object> value)
destObj
- (optional) object whose values will be changed.
value
- The value to set the property to
void type_macro()
void validate(<jala.Form.Tracker> tracker)
tracker
- Tracker object collecting request data, error messages and parsed values.
|
Jala 1.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |