Package nl.gx.webmanager.taglib.edit
Class RenderExtensionInternalTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.SimpleTagSupport
-
- nl.gx.webmanager.taglib.edit.RenderExtensionInternalTag
-
- All Implemented Interfaces:
javax.servlet.jsp.tagext.DynamicAttributes
,javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.SimpleTag
public class RenderExtensionInternalTag extends javax.servlet.jsp.tagext.SimpleTagSupport implements javax.servlet.jsp.tagext.DynamicAttributes
Implements thewmedit:renderExtension
tag.<wm:renderExtension var="headTag" presentationName="WM custom head tag" /> <wm:renderExtension var="bodyTag" presentationName="WM custom body tag" />
In the example above a custom head tag and body tag for a page are rendered using two different presentations. In this case the default presentation of the content item is not used because the optional presentationName is provided. Additionally, no object is specified which means that the object that is being rendered is the same as the object that is rendered by the jsp this code is in. The example renders both the head and body tag into separate variables. You can also explicitly specify an object and no presentation. This is done in content.jspf, for example:<wmedit:renderExtension object="${element}" />
This render tag renders the extension object ${element} (the jsp loops over all page elements) with whatever presentation name is associated with the object in GX WebManager.
-
-
Constructor Summary
Constructors Constructor Description RenderExtensionInternalTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doTag()
protected Object
getExtension()
Return object or null.protected String
getPresentationName()
Return presentation name.protected String
getVar()
Return var name or null if it is not set.void
setDynamicAttribute(String uri, String localName, Object value)
void
setExtension(Object extension)
Setter for the optional attribute object.void
setPresentationName(String presentationName)
Setter for the required attribute presentationName.void
setVar(String var)
Setter for the optional attribute var.
-
-
-
Method Detail
-
setPresentationName
public void setPresentationName(String presentationName)
Setter for the required attribute presentationName.- Parameters:
presentationName
-
-
getPresentationName
protected String getPresentationName()
Return presentation name.- Returns:
- presentation name.
-
setVar
public void setVar(String var)
Setter for the optional attribute var.- Parameters:
var
- optional value
-
getVar
protected String getVar()
Return var name or null if it is not set.- Returns:
- var name or null if it is not set.
-
setExtension
public void setExtension(Object extension)
Setter for the optional attribute object.- Parameters:
extension
- object attribute
-
getExtension
protected Object getExtension()
Return object or null.- Returns:
- object or null.
-
setDynamicAttribute
public void setDynamicAttribute(String uri, String localName, Object value)
- Specified by:
setDynamicAttribute
in interfacejavax.servlet.jsp.tagext.DynamicAttributes
- See Also:
DynamicAttributes.setDynamicAttribute(java.lang.String, java.lang.String, java.lang.Object)
-
doTag
public void doTag() throws javax.servlet.jsp.JspException
- Specified by:
doTag
in interfacejavax.servlet.jsp.tagext.SimpleTag
- Overrides:
doTag
in classjavax.servlet.jsp.tagext.SimpleTagSupport
- Throws:
javax.servlet.jsp.JspException
- See Also:
SimpleTag.doTag()
-
-