01: /*
02: * Created on Nov 17, 2005
03: */
04: package uk.org.ponder.rsf.componentprocessor;
05:
06: import uk.org.ponder.messageutil.MessageLocator;
07: import uk.org.ponder.rsf.components.UIComponent;
08: import uk.org.ponder.rsf.components.UIMessage;
09:
10: public class MessageFixer implements ComponentProcessor {
11:
12: private MessageLocator messagelocator;
13:
14: public void setMessageLocator(MessageLocator messagelocator) {
15: this .messagelocator = messagelocator;
16: }
17:
18: public void processComponent(UIComponent toprocesso) {
19: if (toprocesso instanceof UIMessage) {
20: UIMessage toprocess = (UIMessage) toprocesso;
21: toprocess.setValue(messagelocator.getMessage(
22: toprocess.messagekeys, toprocess.arguments));
23: }
24: }
25:
26: }
|