|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessagesMapService
Provides a messages map factory service for the Click runtime.
MessagesMapService
implementation is DefaultMessagesMapService
.
You can instruct Click to use a different implementation by adding
the following element to your click.xml configuration file.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <click-app charset="UTF-8"> <pages package="org.apache.click.examples.page"/> <messages-map-service classname="com.mycorp.CustomMessagesMapService"/> </click-app>The class com.mycorp.CustomMessagesMapService might be defined as follows:
package com.mycorp; public class CustomMessagesMapService implements MessagesMapService { public MapcreateMessagesMap(Class<?> baseClass, String globalResource, Locale locale) { return new MyMessagesMap(baseClass, globalResource, locale); } }
Method Summary | |
---|---|
Map<String,String> |
createMessagesMap(Class<?> baseClass,
String globalResource,
Locale locale)
Return a new messages map for the given baseClass (a page or control) and the given global resource bundle name. |
void |
onDestroy()
Destroy the MessagesMapService. |
void |
onInit(ServletContext servletContext)
Initialize the MessagesMapService with the given application servlet context. |
Method Detail |
---|
void onInit(ServletContext servletContext) throws Exception
servletContext
- the application servlet context
Exception
- if an error occurs initializing the LogServicevoid onDestroy()
Map<String,String> createMessagesMap(Class<?> baseClass, String globalResource, Locale locale)
baseClass
- the target classglobalResource
- the global resource bundle namelocale
- the users Locale
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |