HDIV API 2.0.4

org.hdiv.taglib.nested.html
Class NestedOptionsTagHDIV

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.apache.struts.taglib.html.OptionsTag
          extended by org.hdiv.taglib.html.OptionsTagHDIV
              extended by org.hdiv.taglib.nested.html.NestedOptionsTagHDIV
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag, org.apache.struts.taglib.nested.NestedNameSupport, org.apache.struts.taglib.nested.NestedPropertySupport, org.apache.struts.taglib.nested.NestedTagSupport

public class NestedOptionsTagHDIV
extends OptionsTagHDIV
implements org.apache.struts.taglib.nested.NestedNameSupport

This tag is an extension of the <html:options> tag.

Note: The nested context of this tag relies on the use of the "property" property, and the internal use of the "name" property. The nested tags rely on these properties and will attempt to set them itself. The <html:options> tag this tag extended allows other options for the tag which don't use these properties. To take advantage of these options, markup using the <html:options> tag instead of the nested tag.

For example, the "collections" option allows you to specify a separate bean reference which itself is a list of objects with properties to access the title and value parts of the html option tag. You can use this in a nested context (the list is a property of a nested bean) by using the nested define tag and the original options tag.

 <nested:nest property="myNestedLevel" />
  <nested:define property="collectionList" />
  <html:options collection="collectionList"
  property="labelProperty"
  valueProperty="valueProperty" />
  </nested:nest >
 

Author:
Gorka Vicente
See Also:
OptionsTagHDIV, Serialized Form

Field Summary
 
Fields inherited from class org.apache.struts.taglib.html.OptionsTag
collection, filter, labelName, labelProperty, messages, name, property
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
NestedOptionsTagHDIV()
           
 
Method Summary
 int doEndTag()
          Complete the processing of the tag.
 int doStartTag()
          Overriding method of the heart of the matter.
 void release()
          Release the tag's resources and reset the values.
 
Methods inherited from class org.hdiv.taglib.html.OptionsTagHDIV
addOption, renderAttribute
 
Methods inherited from class org.apache.struts.taglib.html.OptionsTag
getCollection, getFilter, getIterator, getLabelName, getLabelProperty, getName, getProperty, getStyle, getStyleClass, setCollection, setFilter, setLabelName, setLabelProperty, setName, setProperty, setStyle, setStyleClass
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, 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
 
Methods inherited from interface org.apache.struts.taglib.nested.NestedNameSupport
getName, setName
 
Methods inherited from interface org.apache.struts.taglib.nested.NestedPropertySupport
getProperty, setProperty
 

Constructor Detail

NestedOptionsTagHDIV

public NestedOptionsTagHDIV()
Method Detail

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Overriding method of the heart of the matter. Gets the relative property and leaves the rest up to the original tag implementation. Sweet.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class org.apache.struts.taglib.html.OptionsTag
Returns:
int JSP continuation directive. This is in the hands of the super class.
Throws:
javax.servlet.jsp.JspException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Complete the processing of the tag. The nested tags here will restore all the original value for the tag itself and the nesting context.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class org.apache.struts.taglib.html.OptionsTag
Returns:
int to describe the next step for the JSP processor
Throws:
javax.servlet.jsp.JspException - for the bad things JSP's do

release

public void release()
Release the tag's resources and reset the values.

Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class org.apache.struts.taglib.html.OptionsTag

HDIV 2.0.4

Copyright © 2008 hdiv.org. All Rights Reserved.