org.hippoecm.hst.component.support.forms
Class FormField

java.lang.Object
  extended by org.hippoecm.hst.component.support.forms.FormField

public class FormField
extends Object

Simple value wrapper for form fields (name and data). Supports multiple value fields

Version:
$Id$

Constructor Summary
FormField(String name)
           
 
Method Summary
 void addMessage(String value)
           
 void addValue(String value)
           
 boolean equals(Object o)
           
 List<String> getMessages()
           
 String getName()
           
 String getValue()
          Most of the fields have single values, we'll return first element (if there), null otherwise
 Map<String,String> getValues()
           
 int hashCode()
          Fields should be equal for same names
 void setName(String name)
           
 void setValues(Map<String,String> values)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormField

public FormField(String name)
Method Detail

getName

public String getName()

setName

public void setName(String name)

getValues

public Map<String,String> getValues()

setValues

public void setValues(Map<String,String> values)

addValue

public void addValue(String value)

getValue

public String getValue()
Most of the fields have single values, we'll return first element (if there), null otherwise

Returns:
first value or empty string if no values present

getMessages

public List<String> getMessages()

addMessage

public void addMessage(String value)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Fields should be equal for same names

Overrides:
hashCode in class Object
Returns:
hash code of the field name


Copyright © 2008-2012 Hippo. All Rights Reserved.