public class Attribute
extends javax.servlet.jsp.tagext.TagSupport
implements javax.servlet.jsp.tagext.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 |
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
public int doEndTag() throws javax.servlet.jsp.JspException
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
public int doStartTag()
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
public void release()
release
in interface javax.servlet.jsp.tagext.Tag
release
in class javax.servlet.jsp.tagext.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.