|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.arsdigita.bebop.Completable
com.arsdigita.bebop.SimpleComponent
com.arsdigita.bebop.FormSection
com.arsdigita.bebop.Form
com.arsdigita.bebop.MetaForm
A form that is instantiated on a per-request basis. This class
functions as a placeholder and decorator of the request-specific form
in a Bebop Page.
Subclasses only need to override buildForm to
return the request-specific form. The meta form takes care of
interfacing that form with the normal control flow of serving a Bebop
Page. The meta form will fool the request-specific forms
into thinking that they are part of a static Bebop Page.
The properties of the meta form should be used to initialize the
correspoding properties of the request-specific form whenever
possible. These properties include name,
method, and encType.
Listeners can be added directly to the meta form and are run
whenever the corresponding listeners would be run on an ordinary
form. The source of the FormSectionEvent will be the meta
form.
| Field Summary | |
static String |
versionId
|
| Fields inherited from class com.arsdigita.bebop.Form |
GET, POST |
| Fields inherited from class com.arsdigita.bebop.FormSection |
m_formModel, m_panel |
| Fields inherited from class com.arsdigita.bebop.SimpleComponent |
m_attr |
| Fields inherited from interface com.arsdigita.bebop.util.BebopConstants |
BEBOP_BORDER, BEBOP_BOXPANEL, BEBOP_CELL, BEBOP_CHECKBOX, BEBOP_CHECKBOXGROUP, BEBOP_COLUMNPANEL, BEBOP_DATE, BEBOP_DATETIME, BEBOP_DHTMLEDITOR, BEBOP_FORMERRORS, BEBOP_FORMWIDGET, BEBOP_GRIDPANEL, BEBOP_LIST, BEBOP_MULTISELECT, BEBOP_OPTION, BEBOP_PAD, BEBOP_PADFRAME, BEBOP_PANELROW, BEBOP_PORTAL, BEBOP_PORTLET, BEBOP_RADIO, BEBOP_RADIOGROUP, BEBOP_SEG_BODY, BEBOP_SEG_HEADER, BEBOP_SEG_PANEL, BEBOP_SEGMENT, BEBOP_SELECT, BEBOP_TABLE, BEBOP_TABLEBODY, BEBOP_TABLEROW, BEBOP_TEXTAREA |
| Fields inherited from interface com.arsdigita.bebop.Component |
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE |
| Constructor Summary | |
MetaForm(String name)
Constructs a new meta form. |
|
| Method Summary | |
void |
add(Component pc,
int constraints)
Not implemented because meta forms currently don't support mixing static and dynamic widgets. |
protected void |
addMagicTag()
Do nothing; the dynamic form will take care of the tag. |
abstract Form |
buildForm(PageState state)
Builds the dynamic form. |
protected Element |
generateXMLSansState(PageState s,
Element parent)
Generates the XML representing the form and its widgets, but not the state information, from s. |
protected Form |
getDynamicForm(PageState state)
Retrieves the form for the request represented by state. |
FormData |
getFormData(PageState state)
Returns the form data constructed by process for the
request described by state. |
Container |
getPanel()
Not implemented. |
FormData |
process(PageState state)
Processes the request-specific form for the request represented by state. |
void |
rebuildForm(PageState s)
Force a rebuilding and updating of the dynamic form. |
| Methods inherited from class com.arsdigita.bebop.Form |
excludeParameterFromExport, generateErrors, generateXML, getAction, getName, getProcessInvisible, isRedirecting, register, respond, setAction, setEncType, setFormData, setMethod, setName, setOnReset, setOnSubmit, setProcessInvisible, setRedirecting, toString, traverse |
| Methods inherited from class com.arsdigita.bebop.SimpleComponent |
clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible |
| Methods inherited from class com.arsdigita.bebop.Completable |
addCompletionListener, fireCompletionEvent |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.arsdigita.bebop.Component |
getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible |
| Methods inherited from interface com.arsdigita.util.Lockable |
isLocked |
| Field Detail |
public static final String versionId
| Constructor Detail |
public MetaForm(String name)
name - the name of the form| Method Detail |
protected Form getDynamicForm(PageState state)
state. If the form hasn't been built
yet, calls buildForm to build the
form.
state - describes the current request
public abstract Form buildForm(PageState state)
state.
state - describes the current request
public void rebuildForm(PageState s)
buildForm again and sets the dynamic form to the form
returned by it.
s - describes the current requestpublic FormData getFormData(PageState state)
process for the
request described by state. If the form for this request
hasn't been built yet, calls buildForm.
getFormData in class Formstate - describes the current request
state, or null if the form has not
yet been processed.
protected Element generateXMLSansState(PageState s,
Element parent)
s. The XML generation is
delegated to the request-specific form by calling generateXMLSansState on it.
generateXMLSansState in class Forms - represents the curent request
public FormData process(PageState state)
throws FormProcessException
state.
process in class Formstate - describes the current request
FormProcessExceptionForm.process(...),
FormModel.process(...)protected void addMagicTag()
addMagicTag in class Form
public void add(Component pc,
int constraints)
add in interface Containeradd in class FormSectionpc - the component to add to this containerconstraints - layout constraints (a
bitwise OR of static ints in the particular layout)
UnsupportedOperationExceptionpublic Container getPanel()
getPanel in class FormSectionUnsupportedOperationException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||