de.mguennewig.pobjform.html
Class HtmlRadioElement

java.lang.Object
  extended by de.mguennewig.pobjform.AbstractFormElement
      extended by de.mguennewig.pobjform.AbstractValueElement
          extended by de.mguennewig.pobjform.AbstractRecordElement
              extended by de.mguennewig.pobjform.html.HtmlRecordElement
                  extended by de.mguennewig.pobjform.html.HtmlRadioElement
All Implemented Interfaces:
FormElement, HtmlFormElement, RadioElement, RecordElement, ValueElement, java.lang.Iterable<java.lang.String>

public class HtmlRadioElement
extends HtmlRecordElement
implements RadioElement

Class description goes here.

Author:
Michael Günnewig

Field Summary
 
Fields inherited from interface de.mguennewig.pobjform.RadioElement
RADIO_BUTTON
 
Constructor Summary
HtmlRadioElement(PObjHtmlForm form, RadioEntry entry)
          Creates a new HtmlRadioElement.
 
Method Summary
 java.util.Map<java.lang.String,java.lang.Object> getInitialObject()
          Returns the initial object.
 FormElement getInitialSelected()
           
 java.util.Map<java.lang.String,java.lang.Object> getObject()
          Returns the current object.
 FormElement getSelected()
           
 boolean hasChanged()
          Tests whether the data for this element has been changed.
 boolean isSelected(java.lang.String elementName)
           
 boolean isVisible()
          Tests whether this element will write anything visible.
 void read(javax.servlet.http.HttpServletRequest request)
          Reads the internal state from the HTTP request.
 void setCurrentAsInitialState()
          Copies the current state to the initial state.
 void setInitialSelected(java.lang.String name)
           
 void setObject(java.util.Map<java.lang.String,java.lang.Object> map)
          Sets the current object to the new values from the map for all children.
 void setSelected(java.lang.String elementName)
           
 void write(Layout w, java.util.Collection<HtmlFormElement> postponedElements)
          Writes the form element into the HTML stream.
 void writeErrors(Layout w)
          Writes any error messages concerning this form element into the HTML stream.
 
Methods inherited from class de.mguennewig.pobjform.html.HtmlRecordElement
write
 
Methods inherited from class de.mguennewig.pobjform.AbstractRecordElement
appendToList, getCurrentString, getElement, getInitialString, getNumElement, isMandatory, iterator, setObject, setProperty, setVisible, validate
 
Methods inherited from class de.mguennewig.pobjform.AbstractFormElement
getContainer, getEntry, getForm, getLabel, getProperty, getPullInPrefix, isPulledIn, omitRowHeader, setLabel, setPullInPrefix, startsNewCell
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.mguennewig.pobjform.RecordElement
getElement, getNumElement, iterator
 
Methods inherited from interface de.mguennewig.pobjform.ValueElement
getCurrentString, getInitialString, setObject
 
Methods inherited from interface de.mguennewig.pobjform.FormElement
appendToList, getContainer, getEntry, getForm, getLabel, getProperty, getPullInPrefix, isMandatory, isPulledIn, omitRowHeader, setLabel, setProperty, setPullInPrefix, setVisible, startsNewCell, validate
 

Constructor Detail

HtmlRadioElement

public HtmlRadioElement(PObjHtmlForm form,
                        RadioEntry entry)
Creates a new HtmlRadioElement.

Method Detail

isVisible

public boolean isVisible()
Tests whether this element will write anything visible.

Specified by:
isVisible in interface FormElement
Overrides:
isVisible in class HtmlRecordElement

getInitialSelected

public FormElement getInitialSelected()
Specified by:
getInitialSelected in interface RadioElement

getSelected

public FormElement getSelected()
Specified by:
getSelected in interface RadioElement

isSelected

public boolean isSelected(java.lang.String elementName)
Specified by:
isSelected in interface RadioElement

setSelected

public void setSelected(java.lang.String elementName)
Specified by:
setSelected in interface RadioElement

setInitialSelected

public void setInitialSelected(java.lang.String name)

hasChanged

public boolean hasChanged()
Tests whether the data for this element has been changed.

Specified by:
hasChanged in interface FormElement
Overrides:
hasChanged in class AbstractRecordElement

getObject

public java.util.Map<java.lang.String,java.lang.Object> getObject()
Returns the current object.

Specified by:
getObject in interface ValueElement
Overrides:
getObject in class AbstractRecordElement

setObject

public void setObject(java.util.Map<java.lang.String,java.lang.Object> map)
Sets the current object to the new values from the map for all children.

Specified by:
setObject in interface RecordElement
Overrides:
setObject in class AbstractRecordElement
See Also:
ValueElement.setObject(Object)

getInitialObject

public java.util.Map<java.lang.String,java.lang.Object> getInitialObject()
Returns the initial object.

Specified by:
getInitialObject in interface ValueElement
Overrides:
getInitialObject in class AbstractRecordElement

setCurrentAsInitialState

public void setCurrentAsInitialState()
Copies the current state to the initial state.

Specified by:
setCurrentAsInitialState in interface ValueElement
Overrides:
setCurrentAsInitialState in class AbstractRecordElement

read

public void read(javax.servlet.http.HttpServletRequest request)
Reads the internal state from the HTTP request.

Specified by:
read in interface HtmlFormElement
Overrides:
read in class HtmlRecordElement

write

public void write(Layout w,
                  java.util.Collection<HtmlFormElement> postponedElements)
Writes the form element into the HTML stream.

NOTE: This method writes itself and all its children.

Specified by:
write in interface HtmlFormElement
Overrides:
write in class HtmlRecordElement

writeErrors

public void writeErrors(Layout w)
Writes any error messages concerning this form element into the HTML stream.

Specified by:
writeErrors in interface HtmlFormElement
Overrides:
writeErrors in class HtmlRecordElement