Class CmsJspTagContentShow

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.opencms.jsp.CmsJspTagContentShow
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class CmsJspTagContentShow extends javax.servlet.jsp.tagext.TagSupport
Used to access and display XML content item information from the VFS.

Since:
6.0.0
See Also:
  • 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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    contentShowTagAction(I_CmsXmlContentContainer container, javax.servlet.jsp.PageContext context, String element, Locale locale, boolean escape)
    Internal action method to show an element from a XML content document.
    int
     
    int
     
    Returns the name of the content node element to show.
    Returns the locale.
    void
     
    void
    setElement(String element)
    Sets the name of the content node element to show.
    void
    Set the escape html flag.
    void
    setLocale(String locale)
    Sets the locale.

    Methods inherited from class javax.servlet.jsp.tagext.TagSupport

    doAfterBody, 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 Details

  • Method Details

    • contentShowTagAction

      public static String contentShowTagAction(I_CmsXmlContentContainer container, javax.servlet.jsp.PageContext context, String element, Locale locale, boolean escape)
      Internal action method to show an element from a XML content document.

      Parameters:
      container - the content container to read the XML content from
      context - the current JSP page context
      element - the node name of the element to show
      locale - the locale of the element to show
      escape - if the result html should be escaped or not
      Returns:
      the value of the selected content element
    • doEndTag

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

      public int doStartTag() throws javax.servlet.jsp.JspException
      Specified by:
      doStartTag in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      doStartTag in class javax.servlet.jsp.tagext.TagSupport
      Throws:
      javax.servlet.jsp.JspException
      See Also:
      • Tag.doStartTag()
    • getElement

      public String getElement()
      Returns the name of the content node element to show.

      Returns:
      the name of the content node element to show
    • getLocale

      public String getLocale()
      Returns the locale.

      Returns:
      the locale
    • release

      public void release()
      Specified by:
      release in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      release in class javax.servlet.jsp.tagext.TagSupport
      See Also:
      • Tag.release()
    • setElement

      public void setElement(String element)
      Sets the name of the content node element to show.

      Parameters:
      element - the name of the content node element to show
    • setEscapeHtml

      public void setEscapeHtml(String value)
      Set the escape html flag.

      Parameters:
      value - should be "true" or "false" (all values other then "true" are considered to be false)
    • setLocale

      public void setLocale(String locale)
      Sets the locale.

      Parameters:
      locale - the locale to set