on 09-05-2007 11:06 AM
Hi,
i have created some text messages in the message pool.
i have an text view UI element, in the property of that UI element i have mapped its text to an value node attribute.
now i want that text message from message pool to be displayed as the UI element's text.
help me out with code
Regards,
Suresh
Hi,
You should use the TextAccessor APIs for this. Let's say the message key is TXT_MSG. So you can access the message string as follows:
String msgTxt = wdComponentAPI.getTextAccessor().getText("TXT_MSG");
//bind msgTxt to context...
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
From your first post: <i>i have mapped its text to an value node attribute</i>. Let's say you have called this attribute as "<i>Text</i>" and it's type is String. So you can bind like this:
wdContext.currentContextElement().setText(wdComponentAPI.getTextAccessor().getText("TXT_MSG"));
Regards,
Satyajit.
IWDMessageManager <message manager name> = wdThis.wdGetAPI().getComponent().getMessageManager();
if you have any parameters then write them:
Object[] <object name> = {new Integer(variable1),new Integer(variable2),new String(variable3)};
<message manager name>.reportMessage(IMessage<project name>.< key of the message>,<object name>,true);
This "true" is used when all steps in navigation are to be cancelled on displaying the error message.
Note write parameter in message Pool using .
Regards,
Vito
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sureshkumar,
The message will be displayed in the message area only and not in any of the UI element.
wdComponentAPI.getMessageManager().reportMessage(IMessage<componentname>.<Message Key>,null,true);
This will display message at the end of your screen if you are not having message area UI element in your screen and if you are having one then it will display it wherever your message area is placed on the screen.
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please go thru this link.......could be of use to you........
http://help.sap.com/saphelp_nw70/helpdata/en/ec/1415b06e76584ca6b92fe565206fed/frameset.htm
Regards,
Padmalatha.K
Message was edited by:
Armin Reichert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
messageMgr.reportMessage(IMessage<compname>.msgname, new Object[], false);
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.