PHP2Go Javascript Framework

Class GroupField

Object
   |
   +--GroupField

class GroupField

Defined in form.js


Field Summary
 Array grp
          Members of the group
 String label
          Label of the group
 Boolean multiple
          The group accepts multiple choice or not
 String name
          Name of the group
<private>  Object self
          
 String type
          Type of the group members
 
Constructor Summary
GroupField (<Object> grp)
            The GroupField class encapsulate operations over grouped elements, which are sets of form inputs with the same name, accepting single choice (radio button groups) or multiple choice (checkbox groups)
 
Method Summary
 void clear()
           Unselect the selected option(s) in the group
 void focus()
           Move the focus to the first enabled member of the group
 Array getFormElement()
           Return the array of group members
 Object getValue()
           Return the current value of the group.
 Number invert()
           Invert group members state.
 Boolean isEmpty()
           Verifies if the group has a selected value (or values)
 String serialize()
           Serialize the name of the group and the selected value(s).
 void setAll(<Boolean> b)
           Change all group members to a given state
 void setDisabled(b)
           Enables/disables all elements in the group
 void setValue(<Object> val)
           Changes the selected option(s) of the group.

Field Detail

grp

Array grp

label

String label

multiple

Boolean multiple

name

String name

self

<private> Object self

type

String type

Constructor Detail

GroupField

GroupField(<Object> grp)

Method Detail

clear

void clear()

focus

void focus()

getFormElement

Array getFormElement()

getValue

Object getValue()

invert

Number invert()

isEmpty

Boolean isEmpty()

serialize

String serialize()

setAll

void setAll(<Boolean> b)

setDisabled

void setDisabled(b)

setValue

void setValue(<Object> val)

PHP2Go Javascript Framework

Copyright © 2002-2006 by Marcos Pont
Documentation generated by JSDoc on Sun Oct 7 19:52:10 2007