Package nl.gx.webmanager.taglib.edit
Class TextTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.SimpleTagSupport
-
- nl.gx.webmanager.taglib.edit.TextTag
-
- All Implemented Interfaces:
javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.SimpleTag
public class TextTag extends javax.servlet.jsp.tagext.SimpleTagSupport
Implements thewmedit:text
tag. This tag looks up the value of label edit_language objects. If thevar
attribute is set, the result is bound to the var in the pagecontext, else the result of the lookup is printed.<wmedit:text var="mayEdit" label="pagemodel.may_edit" />
This will lookup the proper text forpagemodel.may_edit
and binds it to themayEdit
variable in the page context. ThemayEdit
variable may later be used to, for example, set a button text.- Author:
- bartk
-
-
Constructor Summary
Constructors Constructor Description TextTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doTag()
int
getContainerId()
Returns the Siteworks id of theHtmlObject
which is passed on as a parameter to the tag, or -1 if it is not set.protected String
getLabel()
Return the language label.protected String
getVar()
Return name of the variable to which the text will be assigned or null.void
setContainerId(int containerid)
Sets the Siteworks id of aHtmlObject
on the myContainer field.void
setLabel(String label)
Setter for the required label attribute.void
setVar(String var)
Setter for the optional var attribute.
-
-
-
Method Detail
-
setVar
public void setVar(String var)
Setter for the optional var attribute.- Parameters:
var
- name of the variable to which the text will be assigned.
-
getVar
protected String getVar()
Return name of the variable to which the text will be assigned or null.- Returns:
- name of the variable to which the text will be assigned or null if not set.
-
setLabel
public void setLabel(String label)
Setter for the required label attribute.- Parameters:
label
- name of the language label.
-
getLabel
protected String getLabel()
Return the language label.- Returns:
- the language label.
-
setContainerId
public void setContainerId(int containerid)
Sets the Siteworks id of aHtmlObject
on the myContainer field. If this is set the tag will use this object as a base to get the correct language label from.- Parameters:
containerid
-HtmlObject
which can be used as a base to get the correct language label from.
-
getContainerId
public int getContainerId()
Returns the Siteworks id of theHtmlObject
which is passed on as a parameter to the tag, or -1 if it is not set.- Returns:
- The Siteworks id of the
HtmlObject
which is passed on as a parameter to the tag, or -1 if it is not set.
-
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
-
-