|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.struts.util.MessageResources
jp.terasoluna.fw.web.struts.util.SpringMessageResources
public class SpringMessageResources
MessageResources implementation class that uses MessageSource of Spring through Struts.
Set SpringMessageResourcesFactory in "factory" attribute of "message-resources" element in
struts-config.xml.
SpringMessageResourcesFactory,
ResourceBundleMessageSource,
jp.terasoluna.fw.message.DataSourceMessageSource,
Serialized Form| Field Summary | |
|---|---|
private org.springframework.web.context.WebApplicationContext |
context
Application context |
private static java.lang.String |
ERR_BEAN_EXCEPTION
Error message key |
private static org.apache.commons.logging.Log |
log
Log instance |
private org.springframework.context.MessageSource |
messageSource
Message source of Spring |
private static long |
serialVersionUID
Serial version ID |
| Fields inherited from class org.apache.struts.util.MessageResources |
|---|
config, defaultFactory, defaultLocale, factory, formats, returnNull |
| Constructor Summary | |
|---|---|
SpringMessageResources(org.apache.struts.util.MessageResourcesFactory factory,
java.lang.String config)
Generates SpringMessageResources by using the specified parameter. |
|
SpringMessageResources(org.apache.struts.util.MessageResourcesFactory factory,
java.lang.String config,
boolean returnNull)
Generates SpringMessageResources by using the specified parameter. |
|
| Method Summary | |
|---|---|
java.lang.String |
getMessage(java.util.Locale locale,
java.lang.String key)
Fetches the message statement based on the specified key and locale. |
private void |
initMessageSource()
Initializes MessageSource. |
| Methods inherited from class org.apache.struts.util.MessageResources |
|---|
escape, getConfig, getFactory, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessageResources, getReturnNull, isEscape, isPresent, isPresent, localeKey, log, log, messageKey, messageKey, setEscape, setReturnNull |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private static org.apache.commons.logging.Log log
private static final java.lang.String ERR_BEAN_EXCEPTION
private org.springframework.web.context.WebApplicationContext context
private org.springframework.context.MessageSource messageSource
| Constructor Detail |
|---|
public SpringMessageResources(org.apache.struts.util.MessageResourcesFactory factory,
java.lang.String config)
factory - Message resource factoryconfig - Bean name of MessageSource fetched from container
(Default"messageSource" when it is omitted, )
public SpringMessageResources(org.apache.struts.util.MessageResourcesFactory factory,
java.lang.String config,
boolean returnNull)
factory - Message resource factoryconfig - Bean name of MessageSource fetched from the container
(Default "messageSource" when it is omitted)returnNull - returnNull of org.apache.struts.util.MessageResources
class.
When false is specified and the message corresponding to the key does not exist,
returns the message in Locale.key format.| Method Detail |
|---|
private void initMessageSource()
public java.lang.String getMessage(java.util.Locale locale,
java.lang.String key)
getMessage in class org.apache.struts.util.MessageResourcesMessageResources.getMessage(java.util.Locale, java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||