|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.tag.StripesTagSupport
net.sourceforge.stripes.tag.WizardFieldsTag
public class WizardFieldsTag
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.
Field Summary |
---|
Fields inherited from class net.sourceforge.stripes.tag.StripesTagSupport |
---|
pageContext, parentTag |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
---|---|
WizardFieldsTag()
|
Method Summary | |
---|---|
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)
Returns true if name is the name of an event handled by ActionBean s of type
beanType . |
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. |
Methods inherited from class net.sourceforge.stripes.tag.StripesTagSupport |
---|
getActionBeanType, getActionBeanUrl, getPageContext, getParent, getParentTag, getTagStack, popPageContextAttributes, pushPageContextAttributes, release, setPageContext, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WizardFieldsTag()
Method Detail |
---|
public void setCurrentFormOnly(boolean currentFormOnly)
public boolean isCurrentFormOnly()
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class StripesTagSupport
JspException
public int doEndTag() throws JspException
doEndTag
in interface Tag
doEndTag
in class StripesTagSupport
JspException
public void doCatch(Throwable throwable) throws Throwable
doCatch
in interface TryCatchFinally
Throwable
public void doFinally()
doFinally
in interface TryCatchFinally
protected void writeWizardFields(FormTag form) throws JspException, StripesJspException
JspException
StripesJspException
protected Set<String> getParamNames()
protected Set<String> getExcludes(FormTag form)
protected boolean isEventName(Class<? extends ActionBean> beanType, String name)
name
is the name of an event handled by ActionBean
s of type
beanType
.
beanType
- An ActionBean
classname
- The name to look up
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |