info.magnolia.cms.taglibs
Class SetNode
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
info.magnolia.cms.taglibs.BaseContentTag
info.magnolia.cms.taglibs.SetNode
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
public class SetNode
- extends BaseContentTag
Exposes a content node to the pagecontext as a Map of nodeData, in order to access the exposed object using JSTL.
Since JSTL doesn't allow calling a method like Content.getNodeData(String)
the Content
is wrapped into a NodeMapWrapper
which exposes NodeData using a map interface. This tag can be useful
in similar situations: (see @jsp.tag-example)
- Version:
- $Revision: 41137 $ ($Author: gjoseph $)
- Author:
- Fabrizio Giustina
- See Also:
- Serialized Form
Nested Class Summary |
class |
SetNode.NodeMapWrapper
Deprecated. use info.magnolia.cms.util.NodeMapWrapper instead |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Method Summary |
int |
doEndTag()
Set contentNode in pagecontext and continue evaluating jsp. |
void |
release()
|
void |
setContent(Content node)
Deprecated. use the contentNode attribute |
void |
setNodeDataName(java.lang.String name)
Set the node data name, e.g. |
void |
setScope(java.lang.String scope)
Scope for the declared variable. |
void |
setVar(java.lang.String var)
The content node will be added to the pagecontext with this name. |
Methods inherited from class info.magnolia.cms.taglibs.BaseContentTag |
getContentNode, getContentNodeCollectionName, getContentNodeName, getCurrentPage, getFirstMatchingNode, getFirtMatchingNode, getNodeDataName, getPath, getRepository, getUuid, isActpage, resolveNode, setActpage, setContentNode, setContentNodeCollectionName, setContentNodeName, setInherit, setPath, setRepository, setUuid |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SetNode
public SetNode()
setVar
public void setVar(java.lang.String var)
- The content node will be added to the pagecontext with this name.
setContent
public void setContent(Content node)
- Deprecated. use the contentNode attribute
setScope
public void setScope(java.lang.String scope)
- Scope for the declared variable. Can be "page" (default), "request", "session" or "application".
setNodeDataName
public void setNodeDataName(java.lang.String name)
- Description copied from class:
BaseContentTag
- Set the node data name, e.g. "mainText".
- Overrides:
setNodeDataName
in class BaseContentTag
doEndTag
public int doEndTag()
- Set contentNode in pagecontext and continue evaluating jsp.
- Specified by:
doEndTag
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in class javax.servlet.jsp.tagext.TagSupport
- Returns:
- int
release
public void release()
- Specified by:
release
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
release
in class BaseContentTag
Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.