cancel
Showing results for 
Search instead for 
Did you mean: 

Context Type Vector

0 Kudos

Hi,

I would like to Consume a Web Service through WD, The return type of the service is Vector and I would like to display result in Table so I have to bind this return type to Table UI.

I have tried to make a Web Service model and mapped it to Controller Context then to View Context but when I try to bind the Table UI to return type value attribute is enabled. I do not know how can I changed the return type so that I can bind it to TextView in Table cell editor.

Is there any one who can help me in this case?

Thanks

Regards

Yasir Noman

Accepted Solutions (0)

Answers (3)

Answers (3)

guru_subramanianb
Active Contributor
0 Kudos

Hi yasir,

I agree with sowjanya that yo u will not be able to bind a java native element to a UI.so the best and fastest way I feel is to iterate a vector and get the value.Once more advatage of a java.util.vector is

it is dynamic in nature.so u will not have any storage problems.

Regards,

Guru

Former Member
0 Kudos

Let us conside you are storing employee objects in a vector.

for(int i=0;i<Vector.size();i++)

{

Employee emp=(Employee) Vector.get(i);

IPrivateView.ITableNodeElement ele=wdContext.createTableNodeELement();

ele.set<<Attrib1>(emp.get<<Attrib1>>);

ele.set<<Attrib2>(emp.get<<Attrib2>>);

wdContext.nodeTableNode().addElement(ele);

}

Regards, Anilkumar

Former Member
0 Kudos

Hallo Yasir

I think you can iterate over the vector and populate context node with data from vector. I don't know if that is the best solution (probably not) but that ought to work.

Regards Bogdan

0 Kudos

Hi,

But the problem is first I have to Bind the Model return type which is Vector to the UI and I can not bind type Vector to UI.

I need to know how can I bind with Web Service complex type like Vector to Table UI. any other solution?

Thanks

Regards

Yasir Noman

Former Member
0 Kudos

Hi,

u will not be able to bind a attribute of Java Native Type to UI element.U can go with solution suggested by

Bogdan Rokosa .

0 Kudos

Hi Bogdan,

Can you please tell me how can I do the Itration over the vector and populate Context node?

Thanks

Regards

Yasir Noman

Former Member
0 Kudos

I was too slow a little

Regards Bogdan