|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.displaytag.localization.I18nJstlAdapter
JSTL implementation of a resource provider and locale resolver. It will make the titleKey attribute of
column tag works the same as fmt:message's key property. This tag must be the descendant of a
fmt:bundle tag in order to use the titleKey. This is just a shortcut, which makes
<display:column titleKey="bar"/>behave the same as
<c:set var="foo">
<fmt:message key="bar"/>
</c:set>
<display:column title="${foo}"/>
If you don't define either titleKey or titleKey property on your column, first the tag
will attempt to look up the property property in your ResourceBundle. Failing that, it will fall back
to the parent class's behavior of just using the property name.
| Field Summary | |
static java.lang.String |
UNDEFINED_KEY
prefix/suffix for missing entries. |
| Constructor Summary | |
I18nJstlAdapter()
Instantiates a new I18nJstlAdapter. |
|
| Method Summary | |
java.lang.String |
getResource(java.lang.String resourceKey,
java.lang.String defaultValue,
javax.servlet.jsp.tagext.Tag tag,
javax.servlet.jsp.PageContext pageContext)
Returns a localized String. |
java.util.Locale |
resolveLocale(javax.servlet.http.HttpServletRequest request)
Returns the Locale choosen for the given request. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String UNDEFINED_KEY
| Constructor Detail |
public I18nJstlAdapter()
| Method Detail |
public java.util.Locale resolveLocale(javax.servlet.http.HttpServletRequest request)
LocaleResolver
resolveLocale in interface LocaleResolverrequest - HttpServletRequest
null should never be returned)LocaleResolver.resolveLocale(HttpServletRequest)
public java.lang.String getResource(java.lang.String resourceKey,
java.lang.String defaultValue,
javax.servlet.jsp.tagext.Tag tag,
javax.servlet.jsp.PageContext pageContext)
I18nResourceProviderresourceKey or
defaultValue for the lookup. For example in column titles defaultValue is the value
of the property attribute and can be used as a default if titleKey is not
specified.
getResource in interface I18nResourceProviderresourceKey - used-specified resource keydefaultValue - default or fallback valuetag - calling tag (TableTag), which can be used to find needed ancestor tagspageContext - jsp page context
I18nResourceProvider.getResource(String, String, Tag, PageContext)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||