info.magnolia.cms.taglibs
Class SetNode

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by info.magnolia.cms.taglibs.BaseContentTag
          extended by info.magnolia.cms.taglibs.SetNode
All Implemented Interfaces:
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
 
Field Summary
 
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
 
Constructor Summary
SetNode()
           
 
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(String name)
          Set the node data name, e.g.
 void setScope(String scope)
          Scope for the declared variable.
 void setVar(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
 

Constructor Detail

SetNode

public SetNode()
Method Detail

setVar

public void setVar(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(String scope)
Scope for the declared variable. Can be "page" (default), "request", "session" or "application".


setNodeDataName

public void setNodeDataName(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.