|
MoreMotion Face API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--MoreMotionObject
|
+--ProcessField
|
+--SuggestBox
Represents Process Field SuggestBox.
SuggestBox is a highly customizable and powerful MoreMotion Object that suggests options to the user
as he types in characters into the input field. After the predefined idle time is expired, this class
prepares an AjaxRequest to retrieve the data from the MoreMotion Ajax Service to suggest to the user.
A Drop-down box is built to display the options received.
During the form submit, SuggestBox appends two parameters to the request; one for the entered text and one for the value associated with the entered or selected text. Depending on the specified properties, this class ensures that the user selects an existing option or types in a non-existing value.
Handlers:
SuggestBox event handler functions that are registered for the SuggestBox events must have one parameter
which is the SuggestBox object.
function MyOnBeforeRowPaintHandler(sbox) {
if (sbox.getFieldValue("DISABLED") == "false") {
...
}
}
Defined in SuggestBox.js
| Field Summary | |
HTMLElement |
elm
The handle to the TEXT INPUT element that is visible and editable. |
Object |
props
SuggestBox Properties Object. |
HTMLElement |
selm
The handle to the HIDDEN INPUT element that will keep the value associated with the selected option. |
| Fields inherited from class ProcessField |
props, elm, needsValueCloning
|
| Fields inherited from class MoreMotionObject |
node, name, type, props
|
| Constructor Summary | |
SuggestBox(node)
|
|
| Method Summary | |
void
|
appendRequestParams(acc,prefix)
Appends the request parameters and their values to the given request parameter accumulator. |
void
|
cancelRequest()
Cancels all the previous requests that are in response pending status. |
void
|
changeSkin(newSkin)
|
void
|
clear()
Clears the values of both TEXT INPUT and HIDDEN INPUT fields.
|
void
|
cloneParams(params1,params2)
|
void
|
closeDropDownBox()
Closes the DropDownBox if it is open |
void
|
focus()
|
String
|
getFieldValue(fieldName, index)
Returns the value of the field from specified row. |
Object
|
getProcessFieldNames(seperator)
|
Syting
|
getSymbolValue(symbol)
Returns the value of the given symbol from the symbol pool |
String
|
getValue()
Returns the associated value and the value delimited with ";". |
Boolean
|
isDropDownBoxOpen()
Returns true is drop down box is curently open, false otherwise. |
String
|
replaceSymbols(s)
This method is meant to be used during building the rows of the DropDownBox or while navigating over the options of the DropDownBox. |
void
|
setSymbolValue(symbol, value)
Sets the value of a pool symbol. |
void
|
setValue(value)
Sets the value of this SuggestBox. |
Boolean
|
validate()
Validates this SuggestBox field and returns true if validation is successful,
false otherwise.
|
| Methods inherited from class ProcessField |
getCaption, reset, setModified, isModified, getRecord, focusTab, notify, notifyEx, runValidationHandler, checkValueIsAvailable, checkValueIsNumber, checkHasValidValue
|
| Methods inherited from class MoreMotionObject |
saveProps, setProp, boolProp, numberProp, charProp, getIValue, setIValue, runHandler
|
| Field Detail |
HTMLElement elm
TEXT INPUT element that is visible and editable.
Object props
| actionName | The name of the Ajax actionParams configuration element |
| dataSource | The name of the data source that will provide the options to suggest |
| valueFieldName | The name the HIDDEN INPUT field that
will keep the value associated with the selected option. |
| autoComplete | AutoComplete Flag. true
means as the user navigates on the options on the DropDownBox the value of focused options
will be transfered to the TEXT INPUT field. |
| delay | The time (in miliseconds) to elapse after the last time the user pressed a key. |
| align | The horizontal alignment of the DropDownBox relative to the TEXT INPUT field
The values are "left" (the default), "right" and "center" |
| width | The width of the DropDownBox in pixels |
| suggestField | The name of the field in the response whose value will be assigned as the option text (the suggested value) of this SuggestBox |
| valueField | The name of the field in the response whose value will be assigned as the value of this SuggestBox |
| waitForResponse | Flag to wait for the Ajax Response once it is sent to the Ajax Service. (Not Recommended) |
| boxStyle | The CSS Styles for the DropDownBox area. |
| hdrStyle | The CSS Styles for the rows header. |
| hdrCaptions | The header captions (separated with commas) |
| hdrStyles | The CSS Styles for header columns. They should be separated with "|" characters. |
| rowStyle | The CSS Styles for the DropDownBox Rows.
The styles for the focussed rows can be given after a "/" character. e.g. rowStyle="background-color:silver/white; color:navy/black". |
| colFields | The Result set field names (separated with commas) for the Row Columns. |
| colWidths | The Widths in percent (separated with commas) of the Row Columns. |
| colAligns | The Alignments (separated with commas) of the Row Columns. The values can be "left", "right", "center" |
| colStyles | The CSS Styles for Row Columns. They should be separated with "|" characters. |
| sbarStyle | The CSS Styles for the Status Bar.
The styles for the last page can be given after a "/" character. e.g. rowStyle="background-color:#silver/pink; |
| onFocusHandler | The name of the onFocus Handler Function. |
| onBeforeSendRequestHandler | The name of the onBeforeSendRequest Handler Function |
| onReceiveResponseHandler | The name of the onReceiveResponse Handler Function |
| onBeforeRowPaint | The name of the onBeforeRowPaint Handler Function |
| onFocusOptionHandler | The name of the onFocusOption Handler Function |
| onChangeHandler | The name of the onChange Handler Function |
| onBlurHandler | The name of the onBlur Handler Function |
| required | The property that specifies what type of input is required for this SuggestBox. The options are:
|
| valErrorHandler | The name of the Validation Error Handler Function |
| valHandler | The name of the Validation Handler Function |
| pageInfo | Page Information as String. See PageInfo. This property should be supplied only if the SuggestBox resides in a DOM content that was fetched with a MoreMotionAjaxManager.refreshAreas() method call. It is required to access the configuration of the origin page. |
rowStyle="background-color:#f1f1f1/white; font:Arial; color:navy/black"
rowStyle=".row/.rowhl"
HTMLElement selm
HIDDEN INPUT element that will keep the value associated with the selected option.
| Constructor Detail |
SuggestBox(node)
| 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)
void cancelRequest()
void changeSkin(newSkin)
void clear()
TEXT INPUT and HIDDEN INPUT fields.void cloneParams(params1,params2)
void closeDropDownBox()
void focus()
String getFieldValue(fieldName, index)
fieldName - The name of the field
index - Row Index (If omitted current row is used)
Object getProcessFieldNames(seperator)
Syting getSymbolValue(symbol)
String getValue()
var v = sbox.getValue(); // "1;Notebooks" Boolean isDropDownBoxOpen()
String replaceSymbols(s)
s - The string that contains $() symbols.
void setSymbolValue(symbol, value)
symbol - The name of the symbol
value - The value of the symbol
void setValue(value)
value - A string that contains both associated value and the value separated with ";". Example: sbox.setValue("1;Notebooks");
Boolean validate()
true if validation is successful,
false otherwise.
|
MoreMotion Face API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||