on 08-27-2008 1:03 PM
Hello folks,
I have a Situation as follows:
WebDynpro component A: My main component
Component A uses the SAP select-option component (B) WDR_SELECT_OPTIONS.
Furthermore I have implemented a search help / calue help component (C), which is used in component B.
Now I have to pass data from component A to component C: because the values of the search help should be restricted by a value that has already been entered in component A (search help enables the user to select a vendor, but only vendors of the country that has already been selected should be displayed).
How to achive this? I know that it is possible to create mapping nodes dynamically during runtime (method ADD_NEW_MAPPED_CHILD_NODE of interface IF_WD_CONTEXT_NODE_INFO). The problem is, that i am not able to pass a reference of the component controller (component C) to the SET_MAPPING_COMPLETE method. In case to do not execute the SET_MAPPING_COMPLETE method, the WD runtime assumes, that the node i mapped is located in the local context, but because of the different components it is located in the remote component (external context). Accessing the mapping node within component A (which is mapped to component B and in turn to component C) leads to a short dump saying
Subnode COMPONENTCONTROLLER.INTERFACECONTROLLER does not exist
See Thread for details of the usage of the search help component and the select-option component.
THX
--MIKE
Mike,
Is it possible that you create an attribute in component A and
the same attribute in component C? . Populate the attribute of component A with the value you want to pass. When you fire outbound plug ( from A to C), fire it with parameter and pass that attribute. Accept that value as import parameter in the handler method of inbound plug of component c. I hope it will help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Thomas:
I used to use EXPORT / IMPORT statement a lot in former times, but in ABAP-OO I try to avoid it´s use if possible, because it somehow conflicts with the aspect of data encapsulation.
@Sharad:
Unfortunately, there is no outbound plug fired when executing a search help, as far as I know at least!
Hi Mike,
you said, youu2019d prefer the ABAP-OO way over the EXPORT u2026 TO MEMORY. The singleton pattern might well be the path to follow: [http://en.wikipedia.org/wiki/Singleton_pattern]
As long as the user stays in one Web Dynpro Application a singleton can easily be accessed from every class and via this way it is also possible to transfer references without the need of serializing them when working with the EXPORT statement.
Cheers
Silke
Hi Mike,
possibly using a singleton that is filled be comp A and read by comp C can do the trick?
Silke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.