org.appfuse.webapp.taglib
Class CountryTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.appfuse.webapp.taglib.CountryTag
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
public class CountryTag
- extends javax.servlet.jsp.tagext.TagSupport
Tag for creating multiple <select> options for displaying a list of
country names.
NOTE - This tag requires a Java2 (JDK 1.2 or later) platform.
- Version:
- $Revision: 1.4.2.1 $ $Date: 2006-06-10 08:00:48 -0600 (Sat, 10 Jun 2006) $
- Author:
- Jens Fischer, Matt Raible
- See Also:
- Serialized Form
| 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 |
|
Method Summary |
protected java.util.List |
buildCountryList(java.util.Locale locale)
Build a List of LabelValues for all the available countries. |
int |
doStartTag()
Process the start of this tag. |
void |
release()
Release aquired resources to enable tag reusage. |
void |
setDefault(java.lang.String selected)
|
void |
setName(java.lang.String name)
|
void |
setPrompt(java.lang.String prompt)
|
void |
setToScope(java.lang.String scope)
Property used to simply stuff the list of countries into a
specified scope. |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, 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 |
CountryTag
public CountryTag()
setName
public void setName(java.lang.String name)
- Parameters:
name - The name to set.
setPrompt
public void setPrompt(java.lang.String prompt)
- Parameters:
prompt - The prompt to set.
setDefault
public void setDefault(java.lang.String selected)
- Parameters:
selected - The selected option.
setToScope
public void setToScope(java.lang.String scope)
- Property used to simply stuff the list of countries into a
specified scope.
- Parameters:
scope -
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Process the start of this tag.
- Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag- Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
- Returns:
- int status
- Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred- See Also:
Tag.doStartTag()
release
public void release()
- Release aquired resources to enable tag reusage.
- Specified by:
release in interface javax.servlet.jsp.tagext.Tag- Overrides:
release in class javax.servlet.jsp.tagext.TagSupport
- See Also:
Tag.release()
buildCountryList
protected java.util.List buildCountryList(java.util.Locale locale)
- Build a List of LabelValues for all the available countries. Uses
the two letter uppercase ISO name of the country as the value and the
localized country name as the label.
- Parameters:
locale - The Locale used to localize the country names.
- Returns:
- List of LabelValues for all available countries.
Copyright © 2003-2007. All Rights Reserved.