MoreMotion Face API

Class SuggestBox

Object
   |
   +--MoreMotionObject
         |
         +--ProcessField
               |
               +--SuggestBox

class SuggestBox
extends ProcessField


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

elm

HTMLElement elm

props

Object props

selm

HTMLElement selm

Constructor Detail

SuggestBox

SuggestBox(node)

Method Detail

appendRequestParams

void appendRequestParams(acc,prefix)

cancelRequest

void cancelRequest()

changeSkin

void changeSkin(newSkin)

clear

void clear()

cloneParams

void cloneParams(params1,params2)

closeDropDownBox

void closeDropDownBox()

focus

void focus()

getFieldValue

String getFieldValue(fieldName, index)

getProcessFieldNames

Object getProcessFieldNames(seperator)

getSymbolValue

Syting getSymbolValue(symbol)

getValue

String getValue()

isDropDownBoxOpen

Boolean isDropDownBoxOpen()

replaceSymbols

String replaceSymbols(s)

setSymbolValue

void setSymbolValue(symbol, value)

setValue

void setValue(value)

validate

Boolean validate()

MoreMotion Face API

Copyright 2002 - 2011, MOR YAZILIM
Documentation generated by JSDoc on Thu Mar 3 18:19:14 2011