Skip to main content



      Home
Home » Archived » EGL Development Tools » Service return parameter(More than one parameter)
Service return parameter [message #858648] Fri, 27 April 2012 04:24 Go to next message
Eclipse UserFriend
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 08:08 Go to previous messageGo to next message
Eclipse UserFriend
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 09:47 Go to previous message
Eclipse UserFriend
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 09:48] by Moderator

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


Current Time: Fri May 23 16:42:26 EDT 2025

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

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

Back to the top