Class PresentationPropertyTag

  • All Implemented Interfaces:
    javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag

    public class PresentationPropertyTag
    extends javax.servlet.jsp.tagext.SimpleTagSupport
    Implements the wm:presentationProperty tag. Looks up a presentation property defined in the presentation context and returns its value in a JSP variable. Several presentation property types are supported:
    • String
    • Integer
    • Boolean
    • Image
    The type for the presentation properties is defined in the presentation descriptor. If one of the above types is defined, an object of the corresponding type is created. Otherwise the value is a String. The values for the properties can be defined in the descriptor files or by creating presentation variants in GX WebManager or by relying on the style information that is defined in GX WebManager.
    Example of usage:
     < wm:presentationProperty var="bulletImage" label="bullet" />
     ${bulletImage.htmlTag}
     
    In the example above the presentation property named 'bullet' is retrieved and its value is returned in the variable 'bulletImage'.
    See Also:
    Image
    • Constructor Detail

      • PresentationPropertyTag

        public PresentationPropertyTag()
    • Method Detail

      • setLabel

        public void setLabel​(String label)
        Specifies the property label to retrieve.
        Parameters:
        label - label of the presentation property
      • getLabel

        protected String getLabel()
        Return the property label to retrieve.
        Returns:
        label of the presentation property.
      • setVar

        public void setVar​(String var)
        Specifies the JSP variable to store the result in.
        Parameters:
        var - name of the var to which the presentation object should be assigned
      • getVar

        protected String getVar()
        Return the JSP variable to store the result in.
        Returns:
        name of the var to which the presentation object should be assigned.
      • setPage

        public void setPage​(Page page)
        Sets the page which is used to retrieve a style property from. For example, this is used for page images in a navigation menu. This attribute is only used for properties of the type image, button, color or font. For other types of properties this attribute is ignored.
        Parameters:
        page - the page which is used to retrieve a style property from
      • getPage

        protected Page getPage()
        Return the page which is used to retrieve a style property from.
        Returns:
        the page which is used to retrieve a style property from
      • setUseTargetPageStyle

        @Deprecated
        public void setUseTargetPageStyle​(boolean useTargetPageStyle)
        Deprecated.
        Specifies whether the style of the target page has to be used to retrieve a style property by instead of the style of the current page. This attribute is only used for properties of the image, button, color or font type. For other types of properties this attribute is ignored.
        Parameters:
        useTargetPageStyle -
      • isUseTargetPageStyle

        protected boolean isUseTargetPageStyle()
        Return whether the style of the target page has to be used to retrieve a style property by instead of the style of the current page.
        Returns:
        true if the target page has to be used to retrieve a color, font, button or image instead of the current page.
      • doTag

        public void doTag()
        Specified by:
        doTag in interface javax.servlet.jsp.tagext.SimpleTag
        Overrides:
        doTag in class javax.servlet.jsp.tagext.SimpleTagSupport