info.magnolia.cms.taglibs
Class Out

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by info.magnolia.cms.taglibs.BaseContentTag
          extended by info.magnolia.cms.taglibs.Out
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class Out
extends BaseContentTag

Writes out the content of a nodeData or - for nodeData of type binary - information of the nodeData.

Version:
$Revision: 41137 $ ($Author: gjoseph $)
Author:
Sameer Charles, Fabrizio Giustina
See Also:
Serialized Form

Field Summary
static String LINK_RESOLVING_ABSOLUTE
          Resolve to a absolute link using the repository to uri mapping.
static String LINK_RESOLVING_NONE
          No uuid to link resolving.
static String LINK_RESOLVING_RELATIVE
          Resolve to relative path.
static String NODE_NAME_NODEDATANAME
          Fake nodeDataName returning the node's name.
 
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
Out()
           
 
Method Summary
 int doEndTag()
           
 String getDefaultValue()
           
protected  String getFilePropertyValue(Content contentNode)
           
 String getUuidToLink()
           
 String getUuidToLinkRepository()
           
 void release()
           
 void setDateLanguage(String language)
          Set which date format shall be delivered.
 void setDatePattern(String pattern)
          Sets the output date format, as per java.text.SimpleDateFormat.
 void setDefaultValue(String defaultValue)
          Default value used if the expresion evaluates to null or an empty string.
 void setEscapeXml(boolean escapeXml)
          Determines whether output will be XML escaped.
 void setFileProperty(String property)
          Sets which information of a file to retrieve.
 void setLineBreak(String lineBreak)
          Determines how line breaks are converted.
 void setNodeDataName(String name)
          The name of the nodeData you wish to write out (required).
 void setScope(String scope)
          Scope for the attribute named from the "var" parameter.
 void setUuidToLink(String uuidToLink)
          Transform a uuid value to a link.
 void setUuidToLinkRepository(String uuidToLinkRepository)
          Used if the uuidToLink attribute is set.
 void setVar(String var)
          If set, the result of the evaluation will be set to a variable named from this attribute (and in the scope defined using the "scope" attribute, defaulting to PAGE) instead of being written directly to the page.
 
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
 

Field Detail

NODE_NAME_NODEDATANAME

public static final String NODE_NAME_NODEDATANAME
Fake nodeDataName returning the node's name.

See Also:
Constant Field Values

LINK_RESOLVING_NONE

public static final String LINK_RESOLVING_NONE
No uuid to link resolving.

See Also:
Constant Field Values

LINK_RESOLVING_RELATIVE

public static final String LINK_RESOLVING_RELATIVE
Resolve to relative path. Path is relative to current page.

See Also:
Constant Field Values

LINK_RESOLVING_ABSOLUTE

public static final String LINK_RESOLVING_ABSOLUTE
Resolve to a absolute link using the repository to uri mapping.

See Also:
Constant Field Values
Constructor Detail

Out

public Out()
Method Detail

setNodeDataName

public void setNodeDataName(String name)
The name of the nodeData you wish to write out (required). There are following special values supported name, uuid, path, handle. If you specify one of special values, the behavior changes to output the name, uuid, path, or handle of the node instead of the value it stores.

Overrides:
setNodeDataName in class BaseContentTag

setVar

public void setVar(String var)
If set, the result of the evaluation will be set to a variable named from this attribute (and in the scope defined using the "scope" attribute, defaulting to PAGE) instead of being written directly to the page.


setEscapeXml

public void setEscapeXml(boolean escapeXml)
Determines whether output will be XML escaped.


setScope

public void setScope(String scope)
Scope for the attribute named from the "var" parameter. Setting this attribute doesn't have any effect if "var" is not set.


setFileProperty

public void setFileProperty(String property)
Sets which information of a file to retrieve. Only applies for nodeDatas of type=Binary. Supported values (sample value):


setDatePattern

public void setDatePattern(String pattern)
Sets the output date format, as per java.text.SimpleDateFormat. Default is "yyyy-MM-dd". Only applies for nodeDatas of type=Date.


setDateLanguage

public void setDateLanguage(String language)
Set which date format shall be delivered. Does only apply for nodeDatas of type=Date. Language according to java.util.Locale.


setLineBreak

public void setLineBreak(String lineBreak)
Determines how line breaks are converted. Defaults to "
". Set to "" to have no line break at all, or any other value to be used as the line break.


getFilePropertyValue

protected String getFilePropertyValue(Content contentNode)

doEndTag

public int doEndTag()
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class BaseContentTag

getUuidToLink

public String getUuidToLink()

setUuidToLink

public void setUuidToLink(String uuidToLink)
Transform a uuid value to a link. The following values are supported:


getUuidToLinkRepository

public String getUuidToLinkRepository()

setUuidToLinkRepository

public void setUuidToLinkRepository(String uuidToLinkRepository)
Used if the uuidToLink attribute is set. The content is found in this repository. Defaults to "website".


getDefaultValue

public String getDefaultValue()

setDefaultValue

public void setDefaultValue(String defaultValue)
Default value used if the expresion evaluates to null or an empty string.



Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.