|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.jelly.TagSupport
org.apache.commons.jelly.tags.fmt.SetLocaleTag
public class SetLocaleTag
Support for tag handlers for <setLocale>, the locale setting tag in JSTL.
Field Summary | |
---|---|
private static char |
HYPHEN
|
private java.lang.String |
scope
|
private static char |
UNDERSCORE
|
private org.apache.commons.jelly.expression.Expression |
value
|
private org.apache.commons.jelly.expression.Expression |
variant
|
Fields inherited from class org.apache.commons.jelly.TagSupport |
---|
body, context, hasTrimmed, parent, shouldTrim |
Constructor Summary | |
---|---|
SetLocaleTag()
Creates a new instance of SetLocaleTag |
Method Summary | |
---|---|
void |
doTag(org.apache.commons.jelly.XMLOutput output)
Evaluates this tag after all the tags properties have been initialized. |
private static java.util.Locale |
findFormattingMatch(java.util.Locale pref,
java.util.Locale[] avail)
|
(package private) static java.util.Locale |
getFormattingLocale(org.apache.commons.jelly.JellyContext jc,
org.apache.commons.jelly.Tag fromTag,
boolean format,
java.util.Locale[] avail)
|
(package private) static java.util.Locale |
getLocale(org.apache.commons.jelly.JellyContext jc,
java.lang.String name)
Returns the locale specified by the named scoped attribute or context configuration parameter. |
static java.util.Locale |
parseLocale(java.lang.String locale)
See parseLocale(String, String) for details. |
static java.util.Locale |
parseLocale(java.lang.String locale,
java.lang.String variant)
Parses the given locale string into its language and (optionally) country components, and returns the corresponding java.util.Locale object. |
void |
setScope(java.lang.String scope)
|
void |
setValue(org.apache.commons.jelly.expression.Expression value)
|
void |
setVariant(org.apache.commons.jelly.expression.Expression variant)
|
Methods inherited from class org.apache.commons.jelly.TagSupport |
---|
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final char HYPHEN
private static final char UNDERSCORE
private org.apache.commons.jelly.expression.Expression value
private org.apache.commons.jelly.expression.Expression variant
private java.lang.String scope
Constructor Detail |
---|
public SetLocaleTag()
Method Detail |
---|
public void doTag(org.apache.commons.jelly.XMLOutput output) throws org.apache.commons.jelly.JellyTagException
org.apache.commons.jelly.JellyTagException
public void setValue(org.apache.commons.jelly.expression.Expression value)
public void setVariant(org.apache.commons.jelly.expression.Expression variant)
public void setScope(java.lang.String scope)
public static java.util.Locale parseLocale(java.lang.String locale)
public static java.util.Locale parseLocale(java.lang.String locale, java.lang.String variant)
locale
- the locale string to parsevariant
- the variant
java.lang.IllegalArgumentException
- if the given locale does not have a
language component or has an empty country componentstatic java.util.Locale getLocale(org.apache.commons.jelly.JellyContext jc, java.lang.String name)
The named scoped attribute is searched in the page, request, session (if valid), and application scope(s) (in this order). If no such attribute exists in any of the scopes, the locale is taken from the named context configuration parameter.
jc
- the page in which to search for the named scoped
attribute or context configuration parametername
- the name of the scoped attribute or context configuration
parameter
static java.util.Locale getFormattingLocale(org.apache.commons.jelly.JellyContext jc, org.apache.commons.jelly.Tag fromTag, boolean format, java.util.Locale[] avail)
private static java.util.Locale findFormattingMatch(java.util.Locale pref, java.util.Locale[] avail)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |