public class WizardFieldsTag extends StripesTagSupport implements TryCatchFinally
Examines the request and include hidden fields for all parameters that have do not have form fields in the current form. Will include multiple values for parameters that have them. Excludes 'special' parameters like the source page parameter, and the parameter that conveyed the event name.
Very useful for implementing basic wizard flow without relying on session scoping of ActionBeans, and without having to name all the parameters that should be carried forward in the form.
pageContext, parentTagEVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE| Constructor and Description |
|---|
WizardFieldsTag() |
| Modifier and Type | Method and Description |
|---|---|
void |
doCatch(Throwable throwable)
Rethrows the passed in throwable in all cases.
|
int |
doEndTag()
Performs the main work of the tag, as described in the class level javadoc.
|
void |
doFinally()
Used to ensure that the input tag is always removed from the tag stack so that there is
never any confusion about tag-parent hierarchies.
|
int |
doStartTag()
Skips over the body because there shouldn't be one.
|
protected Set<String> |
getExcludes(FormTag form)
Returns the list of parameters that should be excluded from the hidden tag.
|
protected Set<String> |
getParamNames()
Returns all the submitted parameters in the current or the former requests.
|
boolean |
isCurrentFormOnly()
Gets whether the tag will output fields for the current form only, or in all cases.
|
protected boolean |
isEventName(Class<? extends ActionBean> beanType,
String name)
|
void |
setCurrentFormOnly(boolean currentFormOnly)
Sets whether or not the parameters should be output only if the form matches the current
request.
|
protected void |
writeWizardFields(FormTag form)
Write out a hidden field which contains parameters that should be sent along with the actual
form fields.
|
getActionBeanType, getActionBeanUrl, getPageContext, getParent, getParentTag, getTagStack, popPageContextAttributes, pushPageContextAttributes, release, setPageContext, setParentpublic void setCurrentFormOnly(boolean currentFormOnly)
public boolean isCurrentFormOnly()
public int doStartTag()
throws JspException
doStartTag in interface TagdoStartTag in class StripesTagSupportJspExceptionpublic int doEndTag()
throws JspException
doEndTag in interface TagdoEndTag in class StripesTagSupportJspExceptionpublic void doCatch(Throwable throwable) throws Throwable
doCatch in interface TryCatchFinallyThrowablepublic void doFinally()
doFinally in interface TryCatchFinallyprotected void writeWizardFields(FormTag form) throws JspException, StripesJspException
JspExceptionStripesJspExceptionprotected Set<String> getParamNames()
protected Set<String> getExcludes(FormTag form)
protected boolean isEventName(Class<? extends ActionBean> beanType, String name)
beanType - An ActionBean classname - The name to look up© Copyright 2005-2006, Stripes Development Team.