|
||||||||||
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.UseActionBeanTag
public class UseActionBeanTag
This tag supports the use of Stripes ActionBean classes as view helpers. It allows for the use of actions as the controller and then their reuse on the page, creating it if it does not exist. A typical usage pattern would be for a page that contains two types of information, the interaction with each being handled by separate ActionBean implementation. Some page events route to the first action and others to the second, but the page still requires data from both in order to render. This tag would define both ActionBeans in the page scope, creating the one that wasn't executing the event.
This class will bind parameters to a created ActionBean just as the execution of an event on an ActionBean would. It does not rebind values to ActionBeans that were previously created for execution of the action. Validation is not done during this binding, except the type conversion required for binding, and no validation errors are produced.
The binding of the ActionBean to the page scope happens whether the ActionBean is created or not, making for a consistent variable to always use when referencing the ActionBean.
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 | |
---|---|
UseActionBeanTag()
|
Method Summary | |
---|---|
int |
doEndTag()
Does nothing. |
int |
doStartTag()
The main work method of the tag. |
String |
getBinding()
Get the UrlBinding of the requested ActionBean |
String |
getEvent()
The event name, if any to execute. |
String |
getId()
Alias for getVar() so that the JSTL and jsp:useBean style are allowed. |
String |
getVar()
Gets the name of the page scope variable to which the ActionBean will be bound. |
boolean |
isAlwaysExecuteEvent()
|
boolean |
isExecuteResolution()
|
boolean |
isValidate()
|
void |
setAlwaysExecuteEvent(boolean alwaysExecuteEvent)
|
void |
setBeanclass(Object beanclass)
Sets the binding attribute by figuring out what ActionBean class is identified and then in turn finding out the appropriate URL for the ActionBean. |
void |
setBinding(String binding)
Set the UrlBinding of the requested ActionBean |
void |
setEvent(String event)
The event name, if any to execute. |
void |
setExecuteResolution(boolean executeResolution)
|
void |
setId(String id)
Alias for setVar() so that the JSTL and jsp:useBean style are allowed. |
void |
setValidate(boolean validate)
|
void |
setVar(String var)
Sets the name of the page scope variable to which the ActionBean will be bound. |
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 UseActionBeanTag()
Method Detail |
---|
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class StripesTagSupport
JspException
- if the ActionBean could not be instantiate and executedpublic int doEndTag()
doEndTag
in interface Tag
doEndTag
in class StripesTagSupport
public void setBeanclass(Object beanclass) throws StripesJspException
beanclass
- the FQN of an ActionBean class, or a Class object for one.
StripesJspException
public String getBinding()
public void setBinding(String binding)
public String getEvent()
public void setEvent(String event)
public String getVar()
public void setVar(String var)
public String getId()
public void setId(String id)
public boolean isValidate()
public void setValidate(boolean validate)
public boolean isAlwaysExecuteEvent()
public void setAlwaysExecuteEvent(boolean alwaysExecuteEvent)
public boolean isExecuteResolution()
public void setExecuteResolution(boolean executeResolution)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |