nl.gx.webmanager.taglib
Class PresentationPropertyTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
      extended by nl.gx.webmanager.taglib.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 in addition to String and Boolean are supported:

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, Font, Button, Color, Layout

Constructor Summary
PresentationPropertyTag()
           
 
Method Summary
 void doTag()
           
protected  java.lang.String getLabel()
          Return the property label to retrieve.
protected  Page getPage()
          Return the page which is used to retrieve a style property from.
protected  java.lang.String getVar()
          Return the JSP variable to store the result in.
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.
 void setLabel(java.lang.String label)
          Specifies the property label to retrieve.
 void setPage(Page page)
          Sets the page which is used to retrieve a style property from.
 void setUseTargetPageStyle(boolean useTargetPageStyle)
          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.
 void setVar(java.lang.String var)
          Specifies the JSP variable to store the result in.
 
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresentationPropertyTag

public PresentationPropertyTag()
Method Detail

setLabel

public void setLabel(java.lang.String label)
Specifies the property label to retrieve.

Parameters:
label - label of the presentation property

getLabel

protected java.lang.String getLabel()
Return the property label to retrieve.

Returns:
label of the presentation property.

setVar

public void setVar(java.lang.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 java.lang.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

public void setUseTargetPageStyle(boolean useTargetPageStyle)
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


Copyright © 2007-2011 GX Software BV. All Rights Reserved.