|
|||||||||||
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.FormStep
The FormStep class modifies the behavior of FormSection with respect to
listener firing. Instead of firing init listeners the first time the
enclosing form is displayed on the page, the FormStep class fires init
listeners the first time the FormStep itself is displayed on the page. The
process, validate, and submission listeners are then fired on every
submission following the one in which the init listeners were fired. This
behavior is useful when used in conjunction with MultiStepForm
or
its subclasses to provide initialization in later steps of a multi step
form that depends on the values entered in earlier steps.
Wizard
,
MultiStepForm
Field Summary | |
static String |
versionId
|
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.Component |
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE |
Constructor Summary | |
|
FormStep(String name)
Constructs a new FormStep with the given name. |
|
FormStep(String name,
Container panel)
Constructs a new FormStep with the given name. |
protected |
FormStep(String name,
Container panel,
FormModel model)
|
Method Summary | |
protected FormInitListener |
createInitListener()
Creates the init listener that forwards init events to this form section. |
protected void |
fireProcess(FormSectionEvent evt)
Calls the process method on all registered process
listeners. |
protected void |
fireSubmitted(FormSectionEvent evt)
Calls the submitted method on all registered submission
listeners. |
protected void |
fireValidate(FormSectionEvent evt)
Calls the validate method on all registered validation
listeners. |
void |
generateXML(PageState ps,
Element parent)
Builds an XML subtree for this component under the specified parent . |
boolean |
isInitialized(PageState ps)
|
void |
register(Form form,
FormModel model)
Traverses the children this FormSection, collecting parameter models and listeners into the supplied FormModel. |
void |
register(Page p)
Registers state parameters for the page with its model. |
Methods inherited from class com.arsdigita.bebop.FormSection |
add, add, addCancelListener, addInitListener, addProcessListener, addSubmissionListener, addValidationListener, children, contains, createProcessListener, createSubmissionListener, createValidationListener, fireCancel, fireInit, forwardInit, forwardProcess, forwardSubmission, forwardValidation, get, getModel, getPanel, indexOf, isEmpty, lock, process, removeCancelListener, removeInitListener, removeProcessListener, removeSubmissionListener, removeValidationListener, respond, size |
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, toString, 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 FormStep(String name)
name
- A name that uniquely identifies this FormStep within it's
enclosing Form.public FormStep(String name, Container panel)
name
- A name that uniquely identifies this FormStep within it's
enclosing Form.panel
- The container used to back this FormStep.protected FormStep(String name, Container panel, FormModel model)
Method Detail |
public void register(Page p)
Component
param
would do
the following in the body of this method:
p.addComponent(this); p.addComponentStateParam(this, param);You should override this method to set the default visibility of your component:
public void register(Page p) { super.register(p); p.setVisibleDefault(childNotInitiallyShown,false); p.setVisibleDefault(anotherChild, false); }Always call
super.register
when you override
register
. Otherwise your component may
malfunction and produce errors like "Widget ... isn't
associated with any Form"
register
in interface Component
register
in class SimpleComponent
public void register(Form form, FormModel model)
FormSection
register
in interface Component
register
in class FormSection
form
- pointer to the form that is set inside Widgets within this
FormSectionmodel
- the FormModel in which to merge ParameterModels and
Listenerspublic boolean isInitialized(PageState ps)
protected FormInitListener createInitListener()
FormSection
createInitListener
in class FormSection
protected void fireSubmitted(FormSectionEvent evt) throws FormProcessException
FormSection
submitted
method on all registered submission
listeners.
fireSubmitted
in class FormSection
evt
- the event to pass to the listeners
FormProcessException
- if one of the listeners throws such an
exception.protected void fireValidate(FormSectionEvent evt)
FormSection
validate
method on all registered validation
listeners.
fireValidate
in class FormSection
evt
- the event to pass to the listenersprotected void fireProcess(FormSectionEvent evt) throws FormProcessException
FormSection
process
method on all registered process
listeners.
fireProcess
in class FormSection
evt
- the event to pass to the listeners
FormProcessException
- if one of the listeners throws such an
exception.public void generateXML(PageState ps, Element parent)
FormSection
parent
. Uses the request values stored in
state
.
This method generates DOM to be used with the XSLT template to produce the appropriate output.
generateXML
in interface Component
generateXML
in class FormSection
ps
- the state of the current pageparent
- the node that will be used to write to
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |