on 12-07-2007 12:00 PM
Hi,
I had a message in Message pool.
"Do you want to Modify curreny from to "
I had the "OLD curreny" value and "NEW Currency" values from View Context attributes.
I need to assign these 2 values to place holders in above message.
Is it possiable to format the above message(<b>IWDMessage</b>) with dynamic values at runtime and assign the message to java.lang.String
<b>Example</b>:
String strOldCurrencyValue="42";
String strNewCurrencyValue="38";
String strFormatedMessage ="Do you want to Modify curreny from 42 to 38.
Regards
Chandrashekar.
Hi,
This is possible.
like you used a key in the message pool
ex.
WANT_MODIFY is key for text
"Do you want to Modify curreny from to "
Take an object arry of size 2.
String strOldCurrencyValue="42";
String strNewCurrencyValue="38";
Object[] objects={strOldCurrencyValue,strNewCurrencyValue};
And write following statement:-
wdComponentAPI.getMessageManager().reportMessage(IMessage<CompName>.WANT_MODIFY, objects);
Your work is done.
Regards,
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
This is possiable if message is to be used in"wdComponentAPI.getMessageManager().reportMessage" as per method signature.
<b><i>But What i need to do if I need to use the message as java.lang.String as argument ("dialogText" as below formessage) in "IWDConfirmationDialog".</i></b>
<i>I mean i need to show a dynamic message from message pool in "Confirmation Dialog Window"</i>
IWDControllerInfo controllerInfo = wdControllerAPI.getViewInfo().getViewController();
String <b>dialogText</b>="Do you want to Modify curreny from" +wdContext.currentOldOperationValueElement().getOldOperation() +" to" +wdContext.currentNewOperationValueElement().getNewOperation();
IWDConfirmationDialog dialog =
wdComponentAPI.getWindowManager().createConfirmationWindow(<b>dialogText</b>,controllerInfo.findInEventHandlers("Ok")," Ok ");
dialog.addChoice(controllerInfo.findInEventHandlers("Cancel"), "Cancel");
dialog.open();
Message was edited by:
Raghu v
Hi,
Yes it's possible
Define "Do you want to Modify curreny from to " in MessagePool
You can pass parameters When you are reporting message like
wdComponentAPI.getMessageManager().reportMessage(IMessage<ComponentName>.<Key>,new Object[]{"42","38"},null);
Regards
LakshmiNarayana
Message was edited by:
Lakshmi Narayana Chowdary Namala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.