net.sourceforge.formview
Class FormView

java.lang.Object
  extended by net.sourceforge.formview.FormView
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class FormView
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Description : Form view defintion.

Version:
1.0.0
Author:
Angelo ZERR
See Also:
Serialized Form

Field Summary
protected  org.apache.commons.collections.FastHashMap hFields
          Map of Fields keyed on their property value.
protected  org.apache.commons.collections.FastHashMap hStates
           
protected  java.util.ArrayList lFields
          List of Fields.
protected  java.util.ArrayList lStates
           
protected  java.lang.String name
          The name/key the set of form view rules is stored under.
protected  java.lang.Class updatedByClass
          The class which has updated the form (Validator, FormView or user class)
protected  java.lang.String updatedByMethodName
          The method which has updated the form
 
Constructor Summary
FormView()
           
 
Method Summary
 void addField(FieldView f)
           
 void addField(FieldView f, java.lang.Class updatedByClass)
           
 void addField(FieldView f, java.lang.Class updatedByClass, java.lang.String updatedByMethodName)
          Add a Field to the Form.
 void addState(State state)
           
 java.lang.Object clone()
           
 FieldView getField(java.lang.String property)
           
 FieldView getField(java.lang.String property, java.lang.String state)
           
 java.util.List getFields()
          A List of Fields is returned as an unmodifiable List.
 java.lang.String getName()
          Gets the name/key of the set of validation rules.
 State getState(java.lang.String state)
           
 java.util.List getStates()
           
 java.lang.Class getUpdatedByClass()
           
 java.lang.String getUpdatedByMethodName()
           
 void mergeFieldView(FieldView fieldView)
           
 void setName(java.lang.String name)
          Sets the name/key of the set of validation rules.
 void setUpdatedByClass(java.lang.Class updatedByClass)
           
 void setUpdatedByMethodName(java.lang.String updatedByMethodName)
           
 java.lang.String toHtml()
           
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The name/key the set of form view rules is stored under.


updatedByClass

protected java.lang.Class updatedByClass
The class which has updated the form (Validator, FormView or user class)


updatedByMethodName

protected java.lang.String updatedByMethodName
The method which has updated the form


lFields

protected java.util.ArrayList lFields
List of Fields. Used to maintain the order they were added in although individual Fields can be retrieved using Map of Fields.


hFields

protected org.apache.commons.collections.FastHashMap hFields
Map of Fields keyed on their property value.


lStates

protected java.util.ArrayList lStates

hStates

protected org.apache.commons.collections.FastHashMap hStates
Constructor Detail

FormView

public FormView()
Method Detail

getName

public java.lang.String getName()
Gets the name/key of the set of validation rules.


setName

public void setName(java.lang.String name)
Sets the name/key of the set of validation rules.


getUpdatedByClass

public java.lang.Class getUpdatedByClass()

setUpdatedByClass

public void setUpdatedByClass(java.lang.Class updatedByClass)

getUpdatedByMethodName

public java.lang.String getUpdatedByMethodName()

setUpdatedByMethodName

public void setUpdatedByMethodName(java.lang.String updatedByMethodName)

addField

public void addField(FieldView f,
                     java.lang.Class updatedByClass,
                     java.lang.String updatedByMethodName)
Add a Field to the Form.


addField

public void addField(FieldView f,
                     java.lang.Class updatedByClass)

addField

public void addField(FieldView f)

addState

public void addState(State state)

getState

public State getState(java.lang.String state)

getStates

public java.util.List getStates()

getFields

public java.util.List getFields()
A List of Fields is returned as an unmodifiable List.


getField

public FieldView getField(java.lang.String property)

getField

public FieldView getField(java.lang.String property,
                          java.lang.String state)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

mergeFieldView

public void mergeFieldView(FieldView fieldView)

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object

toHtml

public java.lang.String toHtml()


Copyright 2006 null. All Rights Reserved.