on 05-20-2009 2:45 PM
Hello!!
I have some messages in my WebDynpro component Message Pool.
I am using the following instruction:
IWDMessage m = IMessage<CompName>.MESSAGE; // MESSAGE is the key of an error message
WDMessage message = (WDMessage) m;
Then, when I try to retrieve the message's text via message.getMessageText() the result is null.
How can I get the text?
Hi,
Try this:
String messageText = wdComponentAPI.getTextAccessor().getText("Message_Key");
Hope this helps!
Regards,
Jaya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your answers.
Well, actually I am using Armin's method to retrieve message's text, but far from this practical issue I am still confused about this topic.
It is strange for me that IWDMessage class has no getter methods. Also, Chris Whealy in his "Inside Web Dynpro fro Java" uses the mapping IWDMessage to WDMessage to get the message text without using IWDTextAccessor class.
Hi David,
Use the following Code:
IWDMessageManager msg = wdThis.wdGetAPI().getComponent().getMessageManager();
msg.reportMessage(IMessage<Component Name>.<MESSAGE_KEY>, new Object[]{},true);
I hope this solves your issue, if you are looking for something else, please revert. I'll be happy to help you.
Cheers!!!
Umang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Umang,
I have some queries regarding the error messages in WDJ. For standard wdComponentAPI.getMessageManager messages, the error message automatically drops the last word (making it a 2 line error message) if there are multiple errors (kindly refer to the image below). Can we make it so that it would appear only in one line? I need this to be displayed in one line only, maximizing the space. I’ve tried to set the width for RootContainer and MessageArea to 100% but to no avail. Hope you can help me out on this one. Thanks!
Cheers,
Marj
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.