org.codehaus.waffle.taglib.form
Class SelectTag
java.lang.Object
org.codehaus.waffle.taglib.internal.BasicTag
org.codehaus.waffle.taglib.form.FormElement
org.codehaus.waffle.taglib.form.SelectTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.DynamicAttributes, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
public class SelectTag
- extends FormElement
A combo selection or check box tag based on a collection of items.
- Author:
- Guilherme Silveira, Nico Steppat
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
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 |
Method Summary |
protected IterationResult |
afterBody(javax.servlet.jsp.JspWriter out)
To be implemented by child classes that want to do something after the
body. |
protected void |
beforeBody(java.io.Writer out)
Executes something before body evaluation. |
protected void |
end(java.io.Writer out)
Ends this tag. |
protected java.lang.String |
getDefaultLabel()
Method to be implemented on child classes. |
protected org.codehaus.waffle.taglib.form.BasicSelectTag.ItemsIterator |
getItemsIterator()
Returns an iterator of items to populate this select tag. |
void |
release()
|
void |
setAddEmpty(boolean addEmpty)
|
void |
setItems(java.util.Collection<java.lang.Object> collection)
|
void |
setName(java.lang.String name)
|
void |
setSelected(java.lang.Object selected)
|
void |
setType(java.lang.String type)
|
void |
setValue(java.lang.String value)
|
void |
setVar(java.lang.String var)
|
protected IterationResult |
start(java.io.Writer out)
Starts this tag once. |
Methods inherited from class org.codehaus.waffle.taglib.internal.BasicTag |
doAfterBody, doInitBody, evaluate, evaluateEl, findAncestor, getAbsoluteUrl, getI18NMessage, getParent, isRendered, setBodyContent, setPageContext, setParent, setRendered |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SelectTag
public SelectTag()
release
public void release()
- Specified by:
release
in interface javax.servlet.jsp.tagext.Tag
getItemsIterator
protected org.codehaus.waffle.taglib.form.BasicSelectTag.ItemsIterator getItemsIterator()
- Returns an iterator of items to populate this select tag.
- Returns:
- the items. null or empty iterator if there are no items.
setItems
public void setItems(java.util.Collection<java.lang.Object> collection)
setValue
public void setValue(java.lang.String value)
setType
public void setType(java.lang.String type)
setSelected
public void setSelected(java.lang.Object selected)
setVar
public void setVar(java.lang.String var)
afterBody
protected IterationResult afterBody(javax.servlet.jsp.JspWriter out)
throws java.io.IOException
- Description copied from class:
BasicTag
- To be implemented by child classes that want to do something after the
body.
- Overrides:
afterBody
in class BasicTag
- Parameters:
out
- the writer
- Throws:
java.io.IOException
end
protected void end(java.io.Writer out)
throws javax.servlet.jsp.JspException,
java.io.IOException
- Description copied from class:
BasicTag
- Ends this tag.
- Overrides:
end
in class BasicTag
- Throws:
javax.servlet.jsp.JspException
java.io.IOException
beforeBody
protected void beforeBody(java.io.Writer out)
throws javax.servlet.jsp.JspException,
java.io.IOException
- Description copied from class:
BasicTag
- Executes something before body evaluation.
- Overrides:
beforeBody
in class BasicTag
- Throws:
javax.servlet.jsp.JspException
java.io.IOException
setAddEmpty
public void setAddEmpty(boolean addEmpty)
start
protected IterationResult start(java.io.Writer out)
throws javax.servlet.jsp.JspException,
java.io.IOException
- Description copied from class:
BasicTag
- Starts this tag once.
- Specified by:
start
in class BasicTag
- Throws:
javax.servlet.jsp.JspException
java.io.IOException
setName
public void setName(java.lang.String name)
getDefaultLabel
protected java.lang.String getDefaultLabel()
- Description copied from class:
FormElement
- Method to be implemented on child classes. Returns the default label if
none is specified.
- Specified by:
getDefaultLabel
in class FormElement
- Returns:
- the default label
Copyright © 2008. All Rights Reserved.