nl.gx.webmanager.taglib
Class PagePartTag
java.lang.Object
javax.servlet.jsp.tagext.SimpleTagSupport
nl.gx.webmanager.taglib.RenderTag
nl.gx.webmanager.taglib.PagePartTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.DynamicAttributes, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag
public class PagePartTag
- extends RenderTag
Implements the wm:pagePart tag. The label defines which .jspf is used to generate the
content (looked up in the presentation mappings that GX WebManager creates by reading the presentation
descriptor files). A GX WebManager page can contain content consisting of multiple elements, each with
their own presentation JSPs. To show these elements, the page presentation JSP should contain a wm tag
that renders these elements, e.g.:
Example of usage (1):
< div id="column1" >
< wm:pagePart label="Content column 1" />
< /div >
This tells GX WebManager that a pagePart with the label "Content column 1" should be displayed here.
The "Content column 1" label is defined in the presentation descriptor file of content.jspf (i.e. "content.xml")
so the < wm:pagePart > tag effectively tells GX WebManager to execute that .jspf and include the results.
The results may also be put in a variable like this:
Example of usage (2):
< wm:pagePart label="WM content" var="result" />
${result}
Create custom pageParts by defining a .jspf and a .xml descriptor file.
|
Method Summary |
void |
doTag()
|
protected java.lang.String |
getLabel()
Return name of the pagePart presentation mapping. |
void |
setLabel(java.lang.String label)
Specifies the label of the pagepart to render. |
| 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 |
PagePartTag
public PagePartTag()
setLabel
public void setLabel(java.lang.String label)
- Specifies the label of the pagepart to render. Must be an exact match of the value of the < name > defined
in the descriptor XML file, and the < scope > in that file must be "pagepart".
- Parameters:
label - the label of the pagepart to render
getLabel
protected java.lang.String getLabel()
- Return name of the pagePart presentation mapping.
- Returns:
- name of the pagePart presentation mapping.
doTag
public void doTag()
throws javax.servlet.jsp.JspException
- Specified by:
doTag in interface javax.servlet.jsp.tagext.SimpleTag- Overrides:
doTag in class RenderTag
- Throws:
javax.servlet.jsp.JspException
Copyright © 2007-2011 GX Software BV. All Rights Reserved.