nl.gx.webmanager.taglib.edit
Class TextTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
      extended by 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 the wmedit:text tag. This tag looks up the value of label edit_language objects. If the var 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 for pagemodel.may_edit and binds it to the mayEdit variable in the page context. The mayEdit variable may later be used to, for example, set a button text.

Author:
bartk

Constructor Summary
TextTag()
           
 
Method Summary
 void doTag()
          
 int getContainerId()
          Returns the Siteworks id of the HtmlObject which is passed on as a parameter to the tag, or -1 if it is not set.
protected  java.lang.String getLabel()
          Return the language label.
protected  java.lang.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 a HtmlObject on the myContainer field.
 void setLabel(java.lang.String label)
          Setter for the required label attribute.
 void setVar(java.lang.String var)
          Setter for the optional var attribute.
 
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

TextTag

public TextTag()
Method Detail

setVar

public void setVar(java.lang.String var)
Setter for the optional var attribute.

Parameters:
var - name of the variable to which the text will be assigned.

getVar

protected java.lang.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(java.lang.String label)
Setter for the required label attribute.

Parameters:
label - name of the language label.

getLabel

protected java.lang.String getLabel()
Return the language label.

Returns:
the language label.

setContainerId

public void setContainerId(int containerid)
Sets the Siteworks id of a HtmlObject 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 the HtmlObject 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 interface javax.servlet.jsp.tagext.SimpleTag
Overrides:
doTag in class javax.servlet.jsp.tagext.SimpleTagSupport
Throws:
javax.servlet.jsp.JspException


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