| java.lang.Object uk.org.ponder.messageutil.MessageLocator
All known Subclasses: uk.org.ponder.springutil.SpringMessageLocator,
MessageLocator | abstract public class MessageLocator implements BeanLocator,BeanResolver(Code) | | Core interface supporting lookup of localised messages. Very similar to
Spring's MessageSource, only with a greater flexibility of lookup, and the
dependency on the Locale has been factored off into a request-scope
dependency.
MessageLocator also supports use as either a BeanLocator (hence messages may
be addressed directly via EL as #{messageLocator.message-key} )
or as BeanResolver (hence messages may be automatically fetched during
component fixup stage in RSF by declaring the resolver field
in a UIBound to be targetted at the EL
#{messageLocator} .
author: Antranig Basman (antranig@caret.cam.ac.uk) |
Method Summary | |
abstract public String | getMessage(String[] code, Object[] args) See Also: MessageLocator.getMessage(String,Object[]) Parameters: code - An array of potential message codes to be looked up, in orderof priority. | public String | getMessage(String[] code) | public String | getMessage(String code) | public String | getMessage(String code, Object[] args) Parameters: code - the code to lookup up, such as 'calculator.noRateSet' Parameters: args - Array of arguments that will be filled in for params within themessage (params look like "{0}", "{1,date}", "{2,time}" within amessage), or null if none. | public String | getMessage(String[] code, Object param) | public String | getMessage(String code, Object param) | public Object | locateBean(String path) | public String | resolveBean(Object bean) |
getMessage | abstract public String getMessage(String[] code, Object[] args)(Code) | | See Also: MessageLocator.getMessage(String,Object[]) Parameters: code - An array of potential message codes to be looked up, in orderof priority. Each code will be looked up in turn and the resolved messagefrom the first which is found will be returned, if any. This strategy matches that of Spring's MessageSourceResolvable. |
getMessage | public String getMessage(String code, Object[] args)(Code) | | Parameters: code - the code to lookup up, such as 'calculator.noRateSet' Parameters: args - Array of arguments that will be filled in for params within themessage (params look like "{0}", "{1,date}", "{2,time}" within amessage), or null if none. the resolved message, or a default message if not found. |
|
|