MoreMotion Face API

Class OptionBox

Object
   |
   +--MoreMotionObject
         |
         +--ProcessField
               |
               +--OptionBox

class OptionBox
extends ProcessField


This class wraps a container element that includes two or more HTML Input ("radio") Elements and manages it as an input field. The container element can be any HTML DOM element that can contain form input elements. i.e. DIV or TABLE


 <div
   mo:type="OptionBox" mo:field="true" mo:name="GENDER" mo:needsInit="true"
   mo:props="nonBlank:true, warnColor:'Red'" class="c3" mo:iValue="F" >

   <input type="radio" value="M" onclick="PMgr.selectOption(this)" name="_x"/>
   <input type="radio" value="F" onclick="PMgr.selectOption(this)" name="_x"/>
   <input type="hidden" name="pf_GENDER">

 </div> 
The container element should contain a INPUT type="hidden" element whose name attribute has a prefix "pf_" to indicate that it is a Process Field. The values of the name attributes of the INPUT type="radio" elements must be identical so that they act as a group.
Defined in OptionBox.js


Field Summary
 boolean isOptionBox
          
 Array options
          Array that keeps the references to the wrapped HTML Input ("radio") Elements
 HTMLElement selm
          The HTMLElement object of HIDDEN TEXT element that keeps the value to submit to the server.
   
Fields inherited from class ProcessField
props, isProcessField, elm, needsValueCloning
   
Fields inherited from class MoreMotionObject
node, name, type, isMoreMotionObject, props
 
Constructor Summary
OptionBox(node)
           
 
Method Summary
 void base(node)
          
 void clear()
           Clears the checked option and sets the value to blank
 String getValue()
           Returns the value of this field object
 void init()
          
 void selectOption()
           Sets the value of this field object to the value of the selected radio button.
 void setRecordNumber(recnum)
          
 void setValue(value)
           Sets the value of this field object and checks the radio button whose value is equal to the specified value.
 Object validate()
           Validates this field object
 
Methods inherited from class ProcessField
setModified, isModified, getRecord, setSubmitPrefix, appendRequestParams, focusTab, notify, runValidationHandler, checkValueIsAvailable, checkValueIsNumber, checkHasValidValue, runHandler
   
Methods inherited from class MoreMotionObject
saveProps, boolProp, numberProp, charProp, getIValue, setIValue
 

Field Detail

isOptionBox

boolean isOptionBox

options

Array options

selm

HTMLElement selm

Constructor Detail

OptionBox

OptionBox(node)

Method Detail

base

void base(node)

clear

void clear()

getValue

String getValue()

init

void init()

selectOption

void selectOption()

setRecordNumber

void setRecordNumber(recnum)

setValue

void setValue(value)

validate

Object validate()

MoreMotion Face API

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