on 07-31-2007 11:14 AM
Hi,
I use an assistant class to get/set a reference to the comp. controller of my main web dynpro object. I have an additonal component that gets the reference to my main component controller. Now I would like to use some (public) attributes of that comp. controller. This seems not possible. I cannot see the attributes although I have made them public.
Please explain if this is possibla at all. A solution that i currently used is to create get/set methods to retreive those attibutes.
Kind regards,
Raymond
Hi,
As you are passing from one Component to another component you can only pass the component controller attributes as Import parameters to a method of the Other component. Just pass the required ones as parameters.
regards,
Ismail
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if i understand your question correctly is it something like this , you have a Component controller as a used controller in some Component but the context attributes are not mapped so how to access the Context Attributes of the used component if this is your question following is the answer
DATA: L_COMPONENT_CONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER,
L_COMP TYPE REF TO IF_WD_COMPONENT,
L_CONTEXT TYPE REF TO IF_WD_CONTEXT,
L_NODE TYPE REF TO IF_WD_CONTEXT_NODE,
L_CHILD_NODE TYPE REF TO IF_WD_CONTEXT_NODE,
ELEM_OP TYPE REF TO IF_WD_CONTEXT_ELEMENT,
ITEM_AUFNR TYPE STRING.
L_COMPONENT_CONTROLLER = WD_THIS->GET_COMPONENTCONTROLLER_CTR( ).
L_COMP = L_COMPONENT_CONTROLLER->WD_GET_API( ).
L_CONTEXT = L_COMP->GET_CONTEXT( ).
L_NODE = L_CONTEXT->ROOT_NODE->GET_CHILD_NODE( 'ORDERDATA_COMPLETE' ).
L_CHILD_NODE = L_NODE->GET_CHILD_NODE( 'HEADER' ).
ELEM_OP = L_CHILD_NODE->GET_ELEMENT( INDEX = 1 ).
ELEM_OP->GET_ATTRIBUTE( EXPORTING NAME = 'AUFNR' IMPORTING VALUE = ITEM_AUFNR ).
try in the following way
cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vinod,
No it is not like that. I do not want access to the nodes of the component controller. Also I am not using it as a used controller.
- I am sending my comp. cont. to another web dynpro by reference.
- There I can use methods of that comp. contr. (thats nice) because these methods have an interface flag.
- Now I also would like to be able to use comp. contr. attributes (the public ones)
This last thing seems to be impossible.
Kind regards,
Raymond
Hi,
Okay you can do in thais way what you can do is you can have a method in the Component controller and you can have a exporting parameter for that method and the exporting parameter will be the actual comp. contr. attributes (the public ones).
so when you are refering this Component controller in other web dynpro by reference, since you can access the methods of the commponent controller you can call the method you created and inside that method you can write the code by using webdynpro code wizard and in that use the Radio button Read context and assign the read values to the Exporting parameters of your method
cheers
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
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.