|
|||||||||
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 to the page from the page flow. A page input variable has a lifetime of the page in which it is declared and can be referenced using the
pageInput
data binding context.
The name
attribute here is used as the identifier for the variable inside
of this binding context, and the type
attribute is used to identify
the expected type of this variable.
foo
, is defined in the Controller file,
and its value is
passed to a JSP page by using the addPageInput
method and the
<netui-data:declarePageInput> tag.
/** * @jpf:action * @jpf:forward name="simple" path="simple.jsp" */ public Forward simple() { Forward f = new Forward("simple"); f.addPageInput("fooBean", new FooBean()); return f; } public static class FooBean { private String foo = "A Foo String"; public String getFoo() { return foo; } public void setFoo(String foo) { this.foo = foo; } }
<netui-data:declarePageInput name="fooBean" type="pageInput.PageInputController.FooBean"/> ... fooBean.foo: <netui:label value="{pageInput.fooBean.foo}" />
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 the required attribute. |
void |
setType(String type)
Set the type of the variable that referenced with the setName(java.lang.String) attribute on this tag. |
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)
setName(java.lang.String)
attribute on this tag.
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 |