on 05-27-2005 9:35 AM
Hi All,
I want to read a message that is defined in a message pool of a webdynpro component.
This reading should be done from a java file present in the "src" folder.
How can I get the handle to the IWDComponent?
Or is there any other way?
Or is there any way of reading localized messages in a java file of a webdynpro component?
Can you kindly guide me out of this issue?
Thanks and regards
RB
Hello,
my approach is more simple: how can I read within component A the message pool of another webdynpro component B ? Component A has a usage relation to component B .
I tried this within component A:
<b>this.wdThis.wdGetBInterface().wdGetAPI().getComponent().getTextAccessor().getText("ANY_TEXT");</b>
I got the exeption:
<b>java.lang.UnsupportedOperationException: Embedded Components are black boxes. You should not access parts which are not in their interface</b>.
Is there any way to share message pools ?
Thanks
Kerstin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From within a controller, you get the component reference using the generated variable "wdComponentAPI" (which is a shortcut for wdThis.wdGetAPI().getComponent()).
Then you can get the text accessor interface:
IWDTextAccessor texts = wdComponentAPI.getTextAccessor();
[advertising]
Chris Whealy, "Inside Web Dynpro for Java", chapter 7.8
[/advertising]
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Thanks for looking at my query and trying to help me.
Inside a normal java file,
how can I get wdThis?
@Anil - Its not reading from a WD view/WD controller, but from a plain java file which is a part of a "DC" present in the src folder.
I hope the question is clear?
Thanks and regards
Radha Krishna .B
For a description of the Web Dynpro phase model, see "Inside Web Dynpro for Java", chapter 11.
Some of the phases are e.g. validation, event handling, navigation, rendering.
If your code is called from an event handler or method of the component that contains the text accessor, you could pass the IWDTextAccessor reference as a parameter.
Armin
Hi,
Please check this
http://help.sap.com/saphelp_nw04/helpdata/en/72/1d6526263ff24995016a152705eab2/content.htm
Regards, Anilkumar
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.