|
MoreMotion Face API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--MoreMotionObject | +--ProcessField | +--SuggestBox
Represents a very special Process Field called SuggestBox.
A SuggestBox is a highly customizable and powerful MoreMotion Object that suggests options to the user
as he types in the TEXT 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.
This class wraps two HTML elements which are a <INPUT TYPE="TEXT">
element and a
<INPUT TYPE="HIDDEN">
element. The TEXT INPUT
element is for entering new value or filtering the
options to be suggested and the HIDDEN INPUT
element is to keep the value that corresponds to the selected option.
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. |
boolean |
isSuggestBox
|
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, isProcessField, elm, needsValueCloning
|
Fields inherited from class MoreMotionObject |
node, name, type, isMoreMotionObject, props
|
Constructor Summary | |
SuggestBox(node)
|
Method Summary | |
void
|
appendRequestParams(acc)
|
void
|
base(node)
|
void
|
cancelRequest()
Cancels all the previous requests that are in response pending status. |
void
|
clear()
Clears the values of both TEXT INPUT and HIDDEN INPUT fields.
|
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 |
Object
|
getValue()
Returns the value of this field |
Object
|
isDropDownBoxOpen()
Returns |
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
|
setSubmitPrefix(prefix)
|
void
|
setSymbolValue(symbol, value)
Sets the value of a pool symbol. |
void
|
setValue(value)
Sets the value of this field. |
Object
|
styleOrCss(style,alt)
|
boolean
|
validate()
Validates this SuggestBox field and returns true if validation is successful,
false otherwise.
|
Methods inherited from class ProcessField |
setModified, isModified, getRecord, focusTab, notify, runValidationHandler, checkValueIsAvailable, checkValueIsNumber, checkHasValidValue, runHandler
|
Methods inherited from class MoreMotionObject |
saveProps, boolProp, numberProp, charProp, getIValue, setIValue
|
Field Detail |
HTMLElement elm
TEXT INPUT
element that is visible and editable.
boolean isSuggestBox
Object props
valueFieldName | The name the HIDDEN INPUT field that
will keep the value associated with the selected option. |
actionName | The name of the Ajax actionParams configuration element |
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" |
elmWidth | The width of the TEXT INPUT field in pixels |
width | The width of the DropDownBox in pixels |
height | The height of the INPUT field 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 this SuggestBox is 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)
void base(node)
node
- the DOM Element node that is wrapped by this field
void cancelRequest()
void clear()
TEXT INPUT
and HIDDEN INPUT
fields.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)
Object getValue()
Object isDropDownBoxOpen()
String replaceSymbols(s)
s
- The string that contains $() symbols.
void setSubmitPrefix(prefix)
void setSymbolValue(symbol, value)
symbol
- The name of the symbol
value
- The value of the symbol
void setValue(value)
value
- The value to set to the field.
Object styleOrCss(style,alt)
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 |