Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » EGL Development Tools » Service return parameter(More than one parameter)
Service return parameter [message #858648] Fri, 27 April 2012 08:24 Go to next message
Trond Einar Nilsen is currently offline Trond Einar NilsenFriend
Messages: 36
Registered: December 2011
Member
I am a bit stuck trying to get the nested datagrid to work
I have a datagrid inside a datagrid and both grids get data from a service call.
My problem is that the service call runs after the grid is initiated and the first grid will be loaded by the data from the service call as the grid is accessible from the callback function. The nested grid however is not accessible from the callback function.
My problem would be solved if I could return two parameters from one service. One with data for the first grid and one with data for the nested grid.
I cannot find a way to specify two parameter for the return value like this for example "return(ARRAY1, ARRAY2);
I would be very greatful for any hint for how to solve this. Nested datagrid works fine, but I cannot find a way to get it working when I want do load data from a service call.
Rgds Trond
Re: Service return parameter [message #859004 is a reply to message #858648] Fri, 27 April 2012 12:08 Go to previous messageGo to next message
Joseph Vincens is currently offline Joseph VincensFriend
Messages: 31
Registered: December 2011
Location: Prospect CT
Member
Hi Trond,

There are a couple of ways I can think of to handle this; 1. use out parameters or 2. create a wrapper record.

out parameter example:
function f1( p1 string in, p2 ARRAY1 out, p3 ARRAY2 out)
   p2 = new ARRAY1;
   //assign values to p2
   p3 = new Array2;
   //assign value to p3
end



Wrapper record example
record Wrapper
    a1 ARRAY1;
    a1 ARRAY2;
end
function f1(...)returns(Wrapper)



regards,
Joe
Re: Service return parameter [message #859169 is a reply to message #859004] Fri, 27 April 2012 13:47 Go to previous message
Trond Einar Nilsen is currently offline Trond Einar NilsenFriend
Messages: 36
Registered: December 2011
Member
Thanks a lot Joe, you saved my day Smile
I tried the wrapper alternative and it works great (just changed to "a2 ARRAY2")
Rgds Trond

[Updated on: Fri, 27 April 2012 13:48]

Report message to a moderator

Previous Topic:New blog - Accessing your database with JNDI
Next Topic:Error Using JSON REST Response
Goto Forum:
  


Current Time: Tue Oct 08 21:01:06 GMT 2024

Powered by FUDForum. Page generated in 0.05142 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top