on 02-12-2008 5:02 PM
Hi,
I try to get a text from messagepool. The easy case runs fine:
IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();
textAccessor.getText("TESTMSG");
Now I want to add a parameter to the text with key TESTMSG. I think I should call this to retrieve the text with parameter:
textAccessor.getText("TESTMSG", new Object[]{"testParameter"});
But how do I have to write the text with key TESTMSG in the messagepool in order to specify the parameter?
Regards,
Christoph
Sorry for this question. The syntax is "some text with a "
Edited by: Christoph Schäfer on Feb 12, 2008 6:12 PM
Edited by: Christoph Schäfer on Feb 12, 2008 6:12 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Chris,
Define your message in the message pool something like YOUR_MESSAGEPOOL_MSG : Entry of a valid is required for proceeding with the requested service.
and pass the parameter values to the message as follows using the message manager
msgMgr.reportContextAttributeMessage(wdContext.currentContextElement(),attributeInfo,IMessageSimpleErrors.YOUR_MESSAGEPOOL_MSG, new Object[] { param1, param2 },true);
where param1 and param2 are values you want to pass to the message.
Thanks!
Surya.
Edited by: V. Surya on Feb 12, 2008 4:45 PM
String msg = wdComponentAPI.getTextAccessor().getText(IMessage<YourComponent>.YOUR_MESSAGE, new String[] {...});
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.