on 03-28-2008 4:28 AM
Hi,
I created a model by importing from webservice. The webservice has a method which return an object of type ArrayList.
Now my problem is that I can't bind this to my table in webdynpro Iview.
I get the following message.
ContextAttribute Result has JavaNative Type ArrayList
ContextAttribute with java native type cannot be selected
There are other option we can achieve it, but what i want is to bind the arraylist with some concept of array of objects.
Thanks and regards,
Sameer Ali Khan
Hi,
I feel the issue which i am facing is not being analyzed properly. I need to bind the context attribute to an arraylist. How can we do it...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sameer,
Take a context attribute say xyz of type <b>java.util.ArrayList</b>
Default Context Attribute type is string. Go to the property window then browse
Type Value. Select Java Native Type: java.util.ArrayList
ArrayList arr = new ArrayList();
arr.add("Hello");
arr.add("World");
wdContext.currentContextElement().setXyz(arr); // Binding ArrayList to a context Attribute
wdContext.nodeTest().bind(arr); //Binding ArrayList to a context Node
instead of <b>arr</b> Set the ArrayList object that you are getting from the Web service Method;
Regards,
Mithu
Hi Sameer, in your case you will have to iterate that ArrayList, extracting its elements one at the time, casting them to an appropiate ValueObject type, then extract its data attributes and populate your table with them.
Regards!
Julio Herera
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.