com.taggercat.tags
Class HTMLListMenuElementTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.taggercat.tags.AbstractExpEvalTag
          extended by com.taggercat.tags.AbstractHTMLInputTag
              extended by com.taggercat.tags.HTMLListMenuElementTag
All Implemented Interfaces:
com.taggercat.el.ELPropertyResolver, java.io.Serializable, javax.servlet.jsp.tagext.DynamicAttributes, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class HTMLListMenuElementTag
extends AbstractHTMLInputTag

This tag creates a HTML List/Menu input field with the list values generated by the tag's body content.

The generated list element is automatically disabled if:

  1. the user does not have update permissions on the specified data source and field
  2. or there is no tcEntity in the resultset of the specified data source
  3. or there is a condition expression, and it evaluates to false

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
HTMLListMenuElementTag()
           
 
Method Summary
 int doEndTag()
          Resets the internal state of the tag.
 int doStartTag()
          Begins the tags processing.
 java.lang.String getSourcedFrom()
           
 java.lang.String makeElement(Model model, DataSource ds, TCEntity tcEntity)
          Creates the HTML list/menu ( a select) element.
 void setMultiple(boolean multiple)
          Sets the multiple property to create a multi-selection list.
 void setSize(int size)
          Sets the size attribute
 void setSourcedFrom(java.lang.String sourcedFrom)
           
 void setValue(Model model, DataSource ds, TCEntity tcEntity)
          Sets the value attribute.
 
Methods inherited from class com.taggercat.tags.AbstractHTMLInputTag
addBaseAttributes, addBaseEnabledAttributes, getAccesskey, getAjaxValidationJSFunction, getCondition, getDisabled, getDsn, getField, getName, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getRowID, getStyle, getStyleclass, getStyleid, getTabindex, getTitle, getValue, isQbf, isShowDisabled, isXHTMLtag, setAccesskey, setAjaxValidationJSFunction, setCondition, setDisabled, setDsn, setDynamicAttribute, setField, setFormat, setId, setName, setNulls, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setPreserveHTML, setQbf, setReadonly, setRowID, setShowDisabled, setStyle, setStyleclass, setStyleid, setTabindex, setTitle, setValue
 
Methods inherited from class com.taggercat.tags.AbstractExpEvalTag
getModel, resolveProperty, setScope, setVar
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLListMenuElementTag

public HTMLListMenuElementTag()
Method Detail

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Begins the tags processing. The tag's body is included only when there is a current tcEntity in the data source.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class AbstractHTMLInputTag
Throws:
javax.servlet.jsp.JspException
Returns:
EVAL_BODY_INCLUDE

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Resets the internal state of the tag.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class AbstractHTMLInputTag
Throws:
javax.servlet.jsp.JspException
Returns:
EVAL_PAGE

makeElement

public java.lang.String makeElement(Model model,
                                    DataSource ds,
                                    TCEntity tcEntity)
                             throws javax.servlet.jsp.JspException
Creates the HTML list/menu ( a select) element.

Throws:
javax.servlet.jsp.JspException
Parameters:
model - the model
ds - the data source
tcEntity - the TCEntity
Returns:
the complete HTML select element

setValue

public void setValue(Model model,
                     DataSource ds,
                     TCEntity tcEntity)
              throws javax.servlet.jsp.JspException
Sets the value attribute. Since list controls do not use value attribute, this is an extension point, where the default is to do nothing method.

Specified by:
setValue in class AbstractHTMLInputTag
Throws:
javax.servlet.jsp.JspException
Parameters:
model - the model
ds - the data source
tcEntity - the TCEntity

setMultiple

public void setMultiple(boolean multiple)
Sets the multiple property to create a multi-selection list.

Parameters:
multiple - true to create a multi-selection list

setSize

public void setSize(int size)
Sets the size attribute

Parameters:
size -

getSourcedFrom

public java.lang.String getSourcedFrom()

setSourcedFrom

public void setSourcedFrom(java.lang.String sourcedFrom)