|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSimpleTagSupport
AbstractSimpleTag
DeclarePageInput
public class DeclarePageInput
The DeclarePageInput tag is used to declare variables that are passed as outputs of Page Flow actions to a JSP. This allows pages to declare a data contract that invoking actions must satisfy in order to successfully render a page; in essence, this is a simple method signature for the JSP.
Page inputs are added to a Page Flow's Forward
class via the
Forward.addActionOutput(String, Object)
method. From the page's
perspective, the action outputs are known as page inputs and are available via the JSP EL
implicit object pageInput
using the name given them on the
Forward
and set on this tag via setName(String)
.
A page input can be declared to be required; if required, the page input must be available in the map of action outputs passed to the page.
For example, to add an actiout output called profile
to a Forward
an action would contain code like:
forward.addActionOutput("profile", yourProfile);In order to declare this as a page input in a JSP, the page would contain a tag as:
<netui-data:declarePageInput name="profile" type="org.someprofile.ProfileBean"/>and the
profile
object could be referenced in the JSP as:
${pageInput.profile}
Constructor Summary | |
---|---|
DeclarePageInput()
|
Method Summary | |
---|---|
void |
doTag()
|
String |
getTagName()
Get the name of this tag. |
void |
setName(String name)
Set the name of a variable that can be referecned using the page input data binding context. |
void |
setRequired(boolean required)
Set a flag that declares whether this page intput is required or optiona. |
void |
setType(String type)
Set the String classname variable that represents the expected type of the page input. |
Methods inherited from class AbstractSimpleTag |
---|
getBufferBody, getHtmlTag, getIdForTagId, getInlineError, getPageContext, getScriptReporter, getUserLocale, hasErrors, registerTagError, registerTagError, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write |
Methods inherited from class SimpleTagSupport |
---|
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeclarePageInput()
Method Detail |
---|
public String getTagName()
getTagName
in interface INetuiTag
getTagName
in class AbstractSimpleTag
public void setName(String name)
name
- the name of the variablepublic void setRequired(boolean required)
required
- whether to require the page input for the pagepublic void setType(String type)
type
- the type of the variable that is referencedpublic void doTag() throws JspException
doTag
in interface SimpleTag
doTag
in class SimpleTagSupport
JspException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |