public class CountryTag
extends javax.servlet.jsp.tagext.TagSupport
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REVISION |
| Constructor and Description |
|---|
CountryTag() |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendFlag(java.lang.StringBuffer sb,
java.lang.String country,
java.lang.String title)
Append the HTML used to display a country flag
|
int |
doEndTag() |
int |
doStartTag() |
static java.lang.String |
getCountryIcon(java.lang.String country)
Retrieve the HTML used to display a country flag
|
void |
setCountry(java.lang.String country)
Set the country to be displayed
|
void |
setTitle(java.lang.String title)
Set the title attribute to used, default behavior is to used the country name.
|
public static final java.lang.String REVISION
public void setCountry(java.lang.String country)
country - an ISO 3166 country code as used by java Localepublic void setTitle(java.lang.String title)
title - a string to use in the title attribute of the imagepublic int doStartTag()
throws javax.servlet.jsp.JspException
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class javax.servlet.jsp.tagext.TagSupportjavax.servlet.jsp.JspExceptionpublic int doEndTag()
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class javax.servlet.jsp.tagext.TagSupportpublic static java.lang.String getCountryIcon(java.lang.String country)
country - an ISO 3166 country code as used by java Localepublic static void appendFlag(java.lang.StringBuffer sb,
java.lang.String country,
java.lang.String title)
sb - a StringBuffer in which to append the HTMLcountry - an ISO 3166 country code as used by java Locale, requiredtitle - an optionnal title to used instead of the country nameCopyright © 2001-2010 Jalios SA. All Rights Reserved.