com.taggercat.tags
Class PickAnchorTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.taggercat.tags.PickAnchorTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

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

This is a convenience tag used to create anchor tags for pop-up pick elements. This tag is used in pop-up pick windows to make an item selectable.

<tc:pickAnchor dsn='skill' displayField='SkillName' codeField='SkillNum' javascript="setSelection" />
results in a tag like
<a href="javascript:setSelection('Electronics','1')">Electronics</a>

There are four placeholders that you can use in your href handler. They are:

  1. {0} - the datasource name
  2. {1} - the displayField value
  3. {2} - the codeField value
  4. {3} - the source rowID

See Also:
Serialized Form
 

Field Summary
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
PickAnchorTag()
           
 
Method Summary
 int doEndTag()
           
 int doStartTag()
          Creates the pick anchor tag.
 void setCodeField(java.lang.String codeField)
          Sets the codeField name attribute.
 void setDisplayField(java.lang.String displayField)
          Sets the displayField name attribute.
 void setDsn(java.lang.String dsn)
          Set the name of the data source this field is a member of.
 void setJavascript(java.lang.String javascript)
          Sets the setJavascript to call.
 void setQbfTarget(boolean qbfTarget)
          Set true if the target field for this pick is a QBF search field.
 java.lang.String toString()
          Returns a String representation of this instance.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PickAnchorTag

public PickAnchorTag()
Method Detail

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Creates the pick anchor tag.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspException
Returns:
SKIP_BODY this tag does not create a body

setCodeField

public void setCodeField(java.lang.String codeField)
Sets the codeField name attribute.

Parameters:
codeField - the new codeField value

setDisplayField

public void setDisplayField(java.lang.String displayField)
Sets the displayField name attribute.

Parameters:
displayField - the displayField

setDsn

public void setDsn(java.lang.String dsn)
Set the name of the data source this field is a member of.

Parameters:
dsn - the new dsn value

setJavascript

public void setJavascript(java.lang.String javascript)
Sets the setJavascript to call.

Parameters:
javascript - the Javascript method to call

setQbfTarget

public void setQbfTarget(boolean qbfTarget)
Set true if the target field for this pick is a QBF search field. If the target is a qbf search field and the pick field contains a comma, then wrap the field in escaped double quotes.

Parameters:
qbfTarget - set true if the target for this pick is a QBF field.

toString

public java.lang.String toString()
Returns a String representation of this instance.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this instance