Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGL Development Tools » IBM i program call from RUI(I'll bite. How?)
IBM i program call from RUI [message #855451] Tue, 24 April 2012 20:57 Go to next message
Dan Darnell is currently offline Dan DarnellFriend
Messages: 145
Registered: November 2011
Location: Arkansas
Senior Member

From the EDT blog:

"We even provide a way to access an IBM i program from a Rich UI application."

I don't see an example of this in the documentation. I read this to mean that I can code a call to an RPG program from a RUI handler without going through the intermediate step of creating a service function that makes the IBM i program call. So, what does this look like in practice?

--Dan
Re: IBM i program call from RUI [message #855495 is a reply to message #855451] Tue, 24 April 2012 21:54 Go to previous message
Dan Darnell is currently offline Dan DarnellFriend
Messages: 145
Registered: November 2011
Location: Arkansas
Senior Member

Took a couple more stabs at it myself and it looks like this is ridiculously simple.

service CallRPGService

	function hello(name string inout) 
	   {
	      @IBMiProgram {         
	      	 programName = "MYRPG",
	         libraryName = "/QSYS.LIB/*LIBL.LIB/",
	         parameterAnnotations = [
	            @AS400Text{length = 40}
	         ],
	         connectionResourceBindingURI =
                     "binding:file:RPGProgramCall1#MyConnection"
	      }
	   }
	   
	end   	
end


In RUI handler:

call callRPGService.hello(varNameField.text) 
       using new HttpProxy
       returning to myCallBackFunction
       onException myExceptionHandler;    


Wow. Well done, folks. This is a big, big deal. Now, if we had that wizard to generate the program call definitions...

--Dan

p.s. I'll see about contributing an example to the wiki since I don't think this call-from-RUI pattern is described there.
Previous Topic:New blog - What's cooking in the EDT kitchen
Next Topic:ExtJS
Goto Forum:
  


Current Time: Sun Dec 21 17:26:11 GMT 2014

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

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