de.mguennewig.pobjform.html
Class PObjHtmlForm

java.lang.Object
  extended by de.mguennewig.pobjform.AbstractPObjForm
      extended by de.mguennewig.pobjform.html.PObjHtmlForm
All Implemented Interfaces:
PObjForm
Direct Known Subclasses:
PClassHtmlSearchForm

public abstract class PObjHtmlForm
extends AbstractPObjForm

A HTML form based implementation of the PObjForm interface.

Author:
Michael Günnewig

Field Summary
 
Fields inherited from class de.mguennewig.pobjform.AbstractPObjForm
ERROR_INVALID_VALUE, ERROR_MANDATORY
 
Constructor Summary
PObjHtmlForm(Container db)
          Creates a new PObject-enhanced HTML form with initialized elements.
 
Method Summary
 FormElement createFormElement(FormEntry entry)
          Creates a FormElement for one specified FormEntry.
 HtmlFormElement narrowFormElement(HtmlFormElement fe)
           
 void read(javax.servlet.http.HttpServletRequest request)
          Reads the internal state from the HTTP request.
 void write(Layout w)
          Writes the form into the HTML stream.
 void write(Layout w, FormEntry entry)
          Writes the form entry into the HTML stream.
 void write(Layout w, FormEntry[] entries)
          Writes the form entries into the HTML stream.
 void writeElement(Layout w, FormEntry entry, boolean hidden)
          Writes the form elements of the given entry directly to the layout.
 
Methods inherited from class de.mguennewig.pobjform.AbstractPObjForm
addErrorMessage, addInvalidValueMessage, addMandatoryMessage, addMessage, addSuccessMessage, clearMessage, clearMessages, dumpMessages, extractIndexes, getContainer, getElementLabelKey, getElements, getMessageCount, getMessageCount, getMessageProperties, getMessages, getMessages, hasChanged, hasChanged, hasChanged, hasMessages, populateForm, populateForm, populateObject, populateObject, setContainer, setCurrentAsInitialState, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.mguennewig.pobjform.PObjForm
getElement, getFormDecl
 

Constructor Detail

PObjHtmlForm

public PObjHtmlForm(Container db)
Creates a new PObject-enhanced HTML form with initialized elements.

Parameters:
db - The database container to use to acquire the persistent objects.
Method Detail

createFormElement

public FormElement createFormElement(FormEntry entry)
Description copied from interface: PObjForm
Creates a FormElement for one specified FormEntry.


narrowFormElement

public HtmlFormElement narrowFormElement(HtmlFormElement fe)

read

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


write

public void write(Layout w)
Writes the form into the HTML stream.


write

public final void write(Layout w,
                        FormEntry entry)
Writes the form entry into the HTML stream.


write

public final void write(Layout w,
                        FormEntry[] entries)
Writes the form entries into the HTML stream.


writeElement

public final void writeElement(Layout w,
                               FormEntry entry,
                               boolean hidden)
Writes the form elements of the given entry directly to the layout.

This method is intended for to write only simple form elements as it does not write the possible sub-elements of the specified form element unless the element does it itself like a radio element.

The element is not put into a HTML table like the write methods do.