|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup
org.apache.wicket.markup.html.panel.Panel
org.apache.wicket.extensions.wizard.WizardStep
public class WizardStep
default implementation of IWizardStep. It is also a panel, which is used as the view
component.
And example of a custom step with a panel follows. Java (defined e.g. in class x.NewUserWizard):
private final class UserNameStep extends WizardStep
{
public UserNameStep()
{
super(new ResourceModel("username.title"), new ResourceModel("username.summary"));
add(new RequiredTextField("user.userName"));
add(new RequiredTextField("user.email").add(EmailAddressValidator.getInstance()));
}
}
HTML (defined in e.g. file x/NewUserWizard$UserNameStep.html):
<wicket:panel>
<table>
<tr>
<td><wicket:message key="username">Username</wicket:message></td>
<td><input type="text" wicket:id="user.userName" /></td>
</tr>
<tr>
<td><wicket:message key="email">Email Adress</wicket:message></td>
<td><input type="text" wicket:id="user.email" /></td>
</tr>
</table>
</wicket:panel>
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.wicket.Component |
|---|
org.apache.wicket.Component.ComponentModelChange, org.apache.wicket.Component.EnabledChange, org.apache.wicket.Component.IVisitor, org.apache.wicket.Component.VisibilityChange |
| Field Summary |
|---|
| Fields inherited from class org.apache.wicket.Component |
|---|
ENABLE, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
| Constructor Summary | |
|---|---|
WizardStep()
Construct without a title and a summary. |
|
WizardStep(org.apache.wicket.model.IModel title,
org.apache.wicket.model.IModel summary)
Creates a new step with the specified title and summary. |
|
WizardStep(org.apache.wicket.model.IModel title,
org.apache.wicket.model.IModel summary,
org.apache.wicket.model.IModel model)
Creates a new step with the specified title and summary. |
|
WizardStep(java.lang.String title,
java.lang.String summary)
Creates a new step with the specified title and summary. |
|
WizardStep(java.lang.String title,
java.lang.String summary,
org.apache.wicket.model.IModel model)
Creates a new step with the specified title and summary. |
|
| Method Summary | |
|---|---|
void |
add(org.apache.wicket.markup.html.form.validation.IFormValidator validator)
Adds a form validator. |
void |
applyState()
This method is called whenever the user presses next while this step is active. |
protected void |
detachModel()
|
org.apache.wicket.Component |
getHeader(java.lang.String id,
org.apache.wicket.Component parent,
IWizard wizard)
Gets the header component for this step. |
java.lang.String |
getSummary()
Gets the summary of this step. |
java.lang.String |
getTitle()
Gets the title of this step. |
org.apache.wicket.Component |
getView(java.lang.String id,
org.apache.wicket.Component parent,
IWizard wizard)
Returns the current view this step is displaying. |
void |
init(IWizardModel wizardModel)
Called to initialize the step. |
boolean |
isComplete()
Checks if this step is compete. |
protected void |
onBeforeRender()
Workaround for adding the form validators. |
protected void |
onInit(IWizardModel wizardModel)
Template method that is called when the step is being initialized. |
void |
setComplete(boolean complete)
Marks this step as compete. |
void |
setSummaryModel(org.apache.wicket.model.IModel summary)
Sets summary. |
void |
setTitleModel(org.apache.wicket.model.IModel title)
Sets title. |
| Methods inherited from class org.apache.wicket.markup.html.panel.Panel |
|---|
onComponentTag, onComponentTagBody, renderHead |
| Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup |
|---|
newHeaderPartContainer, renderHeadFromAssociatedMarkupFile |
| Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
|---|
getMarkupType, getWebPage |
| Methods inherited from class org.apache.wicket.MarkupContainer |
|---|
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, setModel, size, toString, toString, visitChildren, visitChildren |
| Methods inherited from class org.apache.wicket.Component |
|---|
add, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, continueToOriginalDestination, debug, detach, detachBehaviors, detachModels, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getBehaviors, getBehaviors, getClassRelativePath, getComponentBorder, getConverter, getConverter, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMetaData, getModel, getModelComparator, getModelObject, getModelObjectAsString, getModelObjectAsString, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageFactory, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, internalOnModelChanged, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, newPage, newPage, onAfterRender, onAttach, onBeginRequest, onDetach, onEndRequest, onModelChanged, onModelChanging, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMetaData, setModelObject, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WizardStep()
getHeader(String, Component, IWizard).
public WizardStep(org.apache.wicket.model.IModel title,
org.apache.wicket.model.IModel summary)
title - the title of this step.summary - a brief summary of this step or some usage guidelines.
public WizardStep(org.apache.wicket.model.IModel title,
org.apache.wicket.model.IModel summary,
org.apache.wicket.model.IModel model)
title - the title of this step.summary - a brief summary of this step or some usage guidelines.model - Any model which is to be used for this step
public WizardStep(java.lang.String title,
java.lang.String summary)
title - the title of this step.summary - a brief summary of this step or some usage guidelines.
public WizardStep(java.lang.String title,
java.lang.String summary,
org.apache.wicket.model.IModel model)
title - the title of this step.summary - a brief summary of this step or some usage guidelines.model - Any model which is to be used for this step| Method Detail |
|---|
public final void add(org.apache.wicket.markup.html.form.validation.IFormValidator validator)
validator - public void applyState()
IWizardStep
This method will only be called if IWizardModel.isNextAvailable() and
IWizardStep.isComplete() return true.
applyState in interface IWizardStepIWizardStep.applyState()
public org.apache.wicket.Component getHeader(java.lang.String id,
org.apache.wicket.Component parent,
IWizard wizard)
IWizardStep
getHeader in interface IWizardStepid - The id that the component should be created withparent - The parent component (for post 1.2)wizard - The wizard component the header will be placed on
IWizardStep.getHeader(java.lang.String,
org.apache.wicket.Component, org.apache.wicket.extensions.wizard.IWizard)public java.lang.String getSummary()
public java.lang.String getTitle()
public org.apache.wicket.Component getView(java.lang.String id,
org.apache.wicket.Component parent,
IWizard wizard)
IWizardStep
getView in interface IWizardStepid - The id that the component should be created withparent - The parent component (for post 1.2)wizard - The wizard component the header will be placed on
IWizardStep.getView(java.lang.String,
org.apache.wicket.Component, org.apache.wicket.extensions.wizard.IWizard)public final void init(IWizardModel wizardModel)
static wizard model knows all the steps upfront and initializes themm
when starting up. This method will be called when the wizard is
initializing.
The dynamic wizard model initializes steps every time they are
encountered.
This method sets the wizard model and then calls template method
onInit(IWizardModel)
init in interface IWizardStepwizardModel - the model to which the step belongs.public boolean isComplete()
setComplete(boolean) .
isComplete in interface IWizardStepsetComplete(boolean)public void setComplete(boolean complete)
complete - true to allow the wizard to proceed, false otherwise.isComplete()public void setSummaryModel(org.apache.wicket.model.IModel summary)
summary - summarypublic void setTitleModel(org.apache.wicket.model.IModel title)
title - titleprotected void detachModel()
detachModel in class org.apache.wicket.ComponentComponent.detachModel()protected void onBeforeRender()
onBeforeRender in class org.apache.wicket.ComponentComponent.onBeforeRender()protected void onInit(IWizardModel wizardModel)
wizardModel - init(IWizardModel)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||