agonism.dovetail.taglibs
Class Text

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--agonism.dovetail.taglibs.Text
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class Text
extends javax.servlet.jsp.tagext.TagSupport

This class implements the <text> tag, which presents an <input type="text" ... /> or <input type="password" ... /> form element. The type of the form element is determined by the FormElement to which this tag is bound via the setFormElement(agonism.dovetail.site.FormElement) method.

A Text tag is used in a JSP page according to the following fragment:

 <%@ taglib uri="/dovetail-taglibs" prefix="dt" %>
 <%
   RegisterPage pg = SurveySite.instance(request, response, out).getRegisterPage();
   RegisterForm form = pg.getRegisterForm();
 %>
 <dt:text formElement="<%= form.getFirstNameElement() %>"/>
 
If the form-element is bound to a database column whose 'isPassword' attribute is 'true', the input is rendered as type="password".

Author:
Kevin Gilpin
See Also:
Serialized Form

Field Summary
static org.log4j.Category C
           
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
Text()
           
 
Method Summary
 int doStartTag()
           
 void release()
           
 void setAttributes(java.util.Map attributes)
           
 void setFormElement(FormElement fe)
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

C

public static final org.log4j.Category C
Constructor Detail

Text

public Text()
Method Detail

setFormElement

public void setFormElement(FormElement fe)

setAttributes

public void setAttributes(java.util.Map attributes)

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport

release

public void release()
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport