Package nl.gx.webmanager.taglib
Class PresentationPropertyTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.SimpleTagSupport
-
- 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 thewm: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
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 Summary
Constructors Constructor Description PresentationPropertyTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
doTag()
protected String
getLabel()
Return the property label to retrieve.protected Page
getPage()
Return the page which is used to retrieve a style property from.protected 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(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)
Deprecated.void
setVar(String var)
Specifies the JSP variable to store the result in.
-
-
-
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 interfacejavax.servlet.jsp.tagext.SimpleTag
- Overrides:
doTag
in classjavax.servlet.jsp.tagext.SimpleTagSupport
-
-