MoreMotion Face API

Class SuggestBox

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

class SuggestBox
extends ProcessField


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

elm

HTMLElement elm

isSuggestBox

boolean isSuggestBox

props

Object props

selm

HTMLElement selm

Constructor Detail

SuggestBox

SuggestBox(node)

Method Detail

appendRequestParams

void appendRequestParams(acc)

base

void base(node)

cancelRequest

void cancelRequest()

clear

void clear()

closeDropDownBox

void closeDropDownBox()

focus

void focus()

getFieldValue

String getFieldValue(fieldName, index)

getProcessFieldNames

Object getProcessFieldNames(seperator)

getSymbolValue

Syting getSymbolValue(symbol)

getValue

Object getValue()

isDropDownBoxOpen

Object isDropDownBoxOpen()

replaceSymbols

String replaceSymbols(s)

setSubmitPrefix

void setSubmitPrefix(prefix)

setSymbolValue

void setSymbolValue(symbol, value)

setValue

void setValue(value)

styleOrCss

Object styleOrCss(style,alt)

validate

boolean validate()

MoreMotion Face API

Copyright 2002 - 2008, MOR YAZILIM
Documentation generated by JSDoc on Mon Sep 29 14:52:55 2008