public class Attribute extends TagSupport implements Tag
Environment
using one of the supported
Scope
s.
For write-mode, only Scope.REQUEST
and Scope.SESSION
are supported.
In read-mode, you can also "navigate" through objects that are present in the current scope, for example
SESSION.currentSubject.realname
, where SESSION.currentSubject
is the name of the attribute (which is
a Subject
) and realname
is a property of the subject.
<appNG:attribute scope="SESSION" mode="read" name="foo" /> <appNG:attribute scope="REQUEST" mode="read" name="bar" /> <appNG:attribute scope="SESSION" mode="write" name="someName" value="someValue"/> <-- for URL-scope, the name is the zero based index of the path segment (segments are separated by '/') --> <-- for example, if the path is '/en/foo/bar/42' then you can access the '42' with index 3--> <appNG:attribute scope="URL" mode="read" name="3" />
Modifier and Type | Class and Description |
---|---|
static class |
Attribute.Mode
the mode for an
Attribute |
id, pageContext
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
EVAL_BODY_AGAIN
Constructor and Description |
---|
Attribute() |
Attribute(String scope,
String name) |
Modifier and Type | Method and Description |
---|---|
int |
doEndTag() |
int |
doStartTag() |
String |
getMode() |
String |
getName() |
String |
getScope() |
String |
getValue() |
void |
release() |
void |
setMode(String mode) |
void |
setName(String name) |
void |
setScope(String scope) |
void |
setValue(String value) |
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParent, setPageContext, setParent
public int doEndTag() throws JspException
doEndTag
in interface Tag
doEndTag
in class TagSupport
JspException
public int doStartTag()
doStartTag
in interface Tag
doStartTag
in class TagSupport
public void release()
release
in interface Tag
release
in class TagSupport
public String getName()
public void setName(String name)
public String getValue()
public void setValue(String value)
public String getMode()
public void setMode(String mode)
public String getScope()
public void setScope(String scope)
Copyright © 2011–2017 aiticon GmbH. All rights reserved.