on 06-19-2009 3:21 PM
Hi Gurus,
I constructed a dynamic EVS in one view based in a symple type and I will need to use the same one in others 3 views. I imagined that when I refered the created symple type in the others 3 views automatically the dynamic EVS works, but it didn't.
Is it possible or I need to create everthing again and copy and paste in the others 3 views the code for populating the values dynamically in the EVS?
If it's possible, please, give me the details how to do this... I'm beginner in Web Dynpro Java.
Regards
Doug
Hi Doug,
The best way will be create the attribute in the component controller and then map the same attribute to all the views context in which you want this value help.
Now write the code to add the values to this attribute dynamically using the EVS. Do this in the wdDoBeforeNavigation() method of teh controller code.
I hope this helps!
Thanks and Regards
Pravesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to all, for the answers! The tips posted here was so helpfull! Now, the EVS works as expected!
Regards,
Doug
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you are setting the simple type of the context element on the view.
now you have to create the element on the context of the controller and set the simple type on the same controller
then you just have to map it to the other views and thats it
..I dont know how you were refering to the simple type of an element on a view from other view, but try populating it on the component controller or the custom controller that you are using, then map it
Also, I usually populate the values using a BAPI on the wdDoInit method, unless there is a posibility that the values change acording to the user interaction, then I would create a method to do it and then call the method when need it
I think that the wdDoBeforeNavigation executes each time the user fires an action element, thats for something that could change at any moment, If the EVS get filled from a BAPI it would be better to not execute it more than necessary
Edited by: Jean Carlo Abreu on Jun 25, 2009 1:06 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To achieve the EVS we can use two different Methods:
One is Using the simple type:
After creating the dictionary simple type that needs to binded to the context element and the same context element needs to binded to Input field.
You can also achieve this by using Dynamic coding:
In the following coding, welcome is the context element in my workspace.
IWDAttributeInfo a=wdContext.getNodeInfo().getAttribute(IPrivateEVSView.IContextElement.WELCOME);
ISimpleTypeModifiable stm=a.getModifiableSimpleType();
IModifiableSimpleValueSet svs=stm.getSVServices().getModifiableSimpleValueSet();
svs.put("1","one");
svs.put("2","two");
I hope this will work in multiple views.
Kind Regards,
Prasath.R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
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.