Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGL Development Tools » Screen Navigation Using EDT Eclipse(Issue in partial display of developed screens using EDT)
Screen Navigation Using EDT Eclipse [message #808238] Mon, 27 February 2012 10:13 Go to next message
yuvaraj g is currently offline yuvaraj g
Messages: 17
Registered: February 2012
Junior Member
Hi,

Please find attached the document detailing the issue encountered while navigating screens. Please share your ideas/comments in fixing the same.Thanks in advance.


Regards,
Yuvaraj
Re: Screen Navigation Using EDT Eclipse [message #808273 is a reply to message #808238] Mon, 27 February 2012 10:50 Go to previous messageGo to next message
Joe Pluta is currently offline Joe Pluta
Messages: 27
Registered: July 2009
Junior Member
Just so you know, Yuvaraj, I can't see the code in your attachment. I just see a couple of placeholder icons.
Re: Screen Navigation Using EDT Eclipse [message #808391 is a reply to message #808273] Mon, 27 February 2012 13:39 Go to previous messageGo to next message
yuvaraj g is currently offline yuvaraj g
Messages: 17
Registered: February 2012
Junior Member
Dear joe,


Please find attached the code for the two screen handlers.
one is login screen and the other is detail screen about employee who is signing in.

We need to know how to navigate from main screen to the subsequent screen and how to pass parameters to the second screen(in this case we are trying to pass employee userid and name). We also tried delegate function but its giving some error in delegate declaration as below:

// delegate
switchFunction SwitchToPagePart;
error:
"IWN.VAL.3433.e 12/19 The type SwitchToPagePart is not instantiable. The reference to this type must be defined as nullable."

Thanks in advance,
Yuvaraj
  • Attachment: Screen1.txt
    (Size: 4.79KB, Downloaded 161 times)
  • Attachment: screen2.txt
    (Size: 12.59KB, Downloaded 155 times)
Re: Screen Navigation Using EDT Eclipse [message #808410 is a reply to message #808391] Mon, 27 February 2012 14:00 Go to previous messageGo to next message
Joe Pluta is currently offline Joe Pluta
Messages: 27
Registered: July 2009
Junior Member
Okay, without spending a lot of time in your code, let me tell you my preference: I prefer to use RUIWidgets rather than RUIHandlers for each page. My only RUIHandler is a top level page that swaps between the handlers.

My standard is this. My application handler has as its UI a Box named "ui". The Box has one child, the splash screen. When the splash screen is done, I set the first page:

ui.children = [ page1Widget ];

Then, when I want to change panels, I simply replace the children:

ui.children = [ page2Widget ];

The trick here is that the top page has to do the switching. I do that by using the Infobus. When a page widget needs to switch to another page widget, it sends a message to the application RUIHandler via the Infobus, and the RUIHandler then loads the appropriate widget.
Re: Screen Navigation Using EDT Eclipse [message #808670 is a reply to message #808391] Mon, 27 February 2012 21:07 Go to previous messageGo to next message
fahua jin is currently offline fahua jin
Messages: 58
Registered: July 2011
Member
Hi yuvaraj g,

Please refer to my attached two egl files for the handler navigation sample, hope it can help you.

Rocky
  • Attachment: H1.egl
    (Size: 0.79KB, Downloaded 142 times)
  • Attachment: H2.egl
    (Size: 0.87KB, Downloaded 123 times)
Re: Screen Navigation Using EDT Eclipse [message #809471 is a reply to message #808670] Tue, 28 February 2012 18:00 Go to previous messageGo to next message
Theresa Ramsey is currently offline Theresa Ramsey
Messages: 62
Registered: July 2009
Location: research triangle park, n...
Member
Hi,
As Joe recommends, the main way to pass information between handlers is to use the InfoBus, which has publish and subscribe functionality.

The samples, on the EDT Documentation page, can help you learn how to use the InfoBus, plus you can refer to the Help.
Re: Screen Navigation Using EDT Eclipse [message #809947 is a reply to message #808410] Wed, 29 February 2012 08:35 Go to previous messageGo to next message
yuvaraj g is currently offline yuvaraj g
Messages: 17
Registered: February 2012
Junior Member
Hi ,

We are still not clear with the parameter passing between the handlers. we tried with H1 and H2 source code which jinfahua referred.

please find attached the document detailing the required output we tried to achieve using EGL EDT.

Thanks
Re: Screen Navigation Using EDT Eclipse [message #809956 is a reply to message #809471] Wed, 29 February 2012 08:53 Go to previous messageGo to next message
Joe Pluta is currently offline Joe Pluta
Messages: 27
Registered: July 2009
Junior Member
Here's a VERY simple paging project. It has three pages, each of which is a RUI widget. It has an initial RUI handler (Init) that shows a splash screen and then shows page 1.

Each page has buttons for the other pages, as well as a back button. Whenever the user switches page by hitting the button, the page widget sends an Infobus message to the init handler. The handler then switches to the appropriate page.

I did make this a little more than just a page switcher. I added a stack of pages which act as a history. That enables the back button, which will go back through the selected pages until it hits the initial page.

Even an example this simple has a lot of design points. For example, I only have one instance of each page. That makes sense on pages with read-only data, not so much with input-capable fields.

Enjoy!

- Joe
  • Attachment: Paging.zip
    (Size: 29.68KB, Downloaded 161 times)
Re: Screen Navigation Using EDT Eclipse [message #809973 is a reply to message #809947] Wed, 29 February 2012 09:15 Go to previous messageGo to next message
Joe Pluta is currently offline Joe Pluta
Messages: 27
Registered: July 2009
Junior Member
yuvaraj g wrote on Wed, 29 February 2012 08:35
Hi ,
We are still not clear with the parameter passing between the handlers. we tried with H1 and H2 source code which jinfahua referred.
Thanks


Okay, parameter passing is a different topic. So, you want one page to pass a value to another page. The first question is whether this value is persistent or transient. That is, do you want the value to last as you switch from one page to another. If that's what you want, then you need to use a persistent variable which you typically store in the page somewhere. I usually create a library called SessionLib with functions to get and store values.

If not, if you just want to pass the value and forget about it, then you can use either pass it to the second page when you create it (see @EGLProperty) or you could pass it in after the fact by sending an Infobus message.

[Updated on: Wed, 29 February 2012 09:17]

Report message to a moderator

Re: Screen Navigation Using EDT Eclipse [message #809980 is a reply to message #809973] Wed, 29 February 2012 09:24 Go to previous messageGo to next message
yuvaraj g is currently offline yuvaraj g
Messages: 17
Registered: February 2012
Junior Member
Hi JOE,

Thank you so much for your reply.

Can you please explain more about that, like how to set @EGLProperty....

It will be really helpful for us , since we are struck for a long time in these parameter passing and couldn't proceed further.
Re: Screen Navigation Using EDT Eclipse [message #810004 is a reply to message #809980] Wed, 29 February 2012 09:53 Go to previous messageGo to next message
Joe Pluta is currently offline Joe Pluta
Messages: 27
Registered: July 2009
Junior Member
IBM has some really good help text.

Click http://tinyurl.com/7vj7nml for general help on extending Rich UI.

And http://tinyurl.com/7r54xqt for detailed information on the @EGLProperty annotation.


Joe

Re: Screen Navigation Using EDT Eclipse [message #812843 is a reply to message #810004] Sun, 04 March 2012 06:49 Go to previous messageGo to next message
yuvaraj g is currently offline yuvaraj g
Messages: 17
Registered: February 2012
Junior Member
Thank you Joe. now we learnt how to pass parameters between widgets and handlers using Infobus/embedding handler/delegates.

the next challenge what we are facing is , how to pass the same parameters and load the widgets for the consecutive screens. Say for example we have around 6/7 screens. like one parent screen(which is login screen in our case) and multiple immediate child screens and in turn this child screens has many grandchildrens. I need to pass the parameter from parent screen to many child screens and from child screens needs to pass parameters to their grandchilds.

Our observations is, if we use InfoBus, it can able to pass parameters to one level.
for example, we have init screen handler which is a splash screen and three child screen widgets(page1,page2,page3). Infobus passes values from page1 to init or page2 to init or page3 to init. But what we are trying is, to pass parameters from page1 to page2 and from page2 to page3, since our requirement is like navigating(as well as we need to pass parameters)from page1 to page2 ,from page2 to page3 and from page3 to page4.... like that it goes on.


Can you please help us to proceed.



Re: Screen Navigation Using EDT Eclipse [message #813295 is a reply to message #812843] Sun, 04 March 2012 23:21 Go to previous messageGo to next message
Joe Pluta is currently offline Joe Pluta
Messages: 27
Registered: July 2009
Junior Member
You're getting into a very large architectural area, yuvaraj g. But just as a brief comment I'd say that what you're doing is not passing parameters, but setting session variables. If the init screen retrieves some value that is that is then used in many other pages, your best option is to create a library to hold that information and make it available for your application. I usually end up with a library called SessionLib and a record called SessionInfo. SessionLib allows access to a single instance of SessionInfo that everybody can read and write.

I might be able to put together an example to show you, but not tonight. Laughing

Actually, one of these days I need to put together a suite of example programs that explain some of the basic architectural techniques that work well with EGL.

Joe
Re: Screen Navigation Using EDT Eclipse [message #815851 is a reply to message #813295] Thu, 08 March 2012 00:26 Go to previous messageGo to next message
yuvaraj g is currently offline yuvaraj g
Messages: 17
Registered: February 2012
Junior Member
Thank You Joe.

We have put all the screens in one handler as different widgets as you suggested earlier instead of keeping seperate screens and setting variables.

This is working fine. Thank you again.

Yuvaraj
Re: Screen Navigation Using EDT Eclipse [message #897174 is a reply to message #813295] Sun, 22 July 2012 19:45 Go to previous messageGo to next message
Ben Foster is currently offline Ben Foster
Messages: 4
Registered: April 2013
Junior Member
Joe, I took your reference to architecture as my inspiration to take a stab at piecing together the elements of this topic of page navigation and passing data between web pages to formalize your ideas.

I appreciate you presenting the page navigation scheme and I have incorporated it into the architecture.

As one of the developers with Java and JSF development experience (as well as 30 some years of RPG) we are attempting to usher in the EGL language. Having a uniform method of page navigation and parameter passing from the very start will be an immense help.

Thanks, Joe (and others).

I have put together a web page for our group that presents the pieces required to support the architecture. Since I don't have the required number of messages to present the URL, I can only say that it may be viewed at iseries.egl.wordpress.com. The link is presented on the page presented under the topic of Standard Look and Feel.

Re: Screen Navigation Using EDT Eclipse [message #1060519 is a reply to message #808238] Sat, 25 May 2013 18:43 Go to previous messageGo to next message
gio coot is currently offline gio coot
Messages: 22
Registered: December 2012
Junior Member
Hi yuvaraj g

i was interested to your complete project "Issue_NavigatingScreens-1" for playing with it (i'm new in EGL), could you please (if possible) post also the other parts like record, service and so on.
Thanks in advance anyway

Gio

[Updated on: Sat, 25 May 2013 19:00]

Report message to a moderator

Re: Screen Navigation Using EDT Eclipse [message #1060690 is a reply to message #1060519] Mon, 27 May 2013 16:59 Go to previous messageGo to next message
Richard Moulton is currently offline Richard Moulton
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Gio,

I'm not able to provide that code but if you could outline what you're after I may be able to point you at some other code.

Richard
Re: Screen Navigation Using EDT Eclipse [message #1060701 is a reply to message #1060690] Tue, 28 May 2013 02:30 Go to previous messageGo to next message
gio coot is currently offline gio coot
Messages: 22
Registered: December 2012
Junior Member
Hi Richard
thanks for you reply; as i'm new to EGL, i'm looking for small and simple aplication (like could be this "EDT_Issue_NavigatingScreens.doc") for learn the logic to login to the server/database (i'm a RPG programmer on iSeries), and how to build application to manage master files (inventory, customers) and manage invoicing .. etc etc.

Thanks in advance for you help

Gio
Re: Screen Navigation Using EDT Eclipse [message #1060993 is a reply to message #1060701] Wed, 29 May 2013 09:10 Go to previous messageGo to next message
Richard Moulton is currently offline Richard Moulton
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Gio,

Let me have a root around and see what I can find. I'm sure I've seen an example of a Login panel within one of the IBM tutorials.

Richard
Re: Screen Navigation Using EDT Eclipse [message #1061328 is a reply to message #1060993] Fri, 31 May 2013 04:49 Go to previous messageGo to next message
gio coot is currently offline gio coot
Messages: 22
Registered: December 2012
Junior Member
Hi Richard

thanks for your help i will wait for your answer !! (please if possible, see if you can also find axamples about "application to manage master files (inventory, customers) and manage invoicing"; i'm asking too much)

thanks in advance
Re: Screen Navigation Using EDT Eclipse [message #1061391 is a reply to message #1061328] Fri, 31 May 2013 08:38 Go to previous messageGo to next message
Richard Moulton is currently offline Richard Moulton
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Gio,

OK, I did find some stuff (but not much) on the web but it was quite old and out of date but you may still be interested in the example:
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/EGL+Learning+Center/page/RUI+and+JSF+AS400+Logon+-+Authentication+Example

IBM i logon is something I've wanted to have a look at myself so I created the attached project which provides a sample RUI application that requests entry of a system name, user and password and then calls a service to validate the details. In addition to returning a boolean authenticated flag the service also returns an exception message id and message text to interrogate.

When you import the project you'll need to change the project properties, udpate the java build path reference for your local copy of jt400.jar accordingly.

I borrowed some of the code/ideas provided by Ortwin in this post ...
https://www.ibm.com/developerworks/community/forums/html/topic?id=0b5db71a-c930-4d6d-a86d-f7acd2634717&ps=25

There are also some interesting examples here, not about logon, which when I get some time I'll have a look at ...
http://code.metager.de/source/xref/eclipse/edt/org.eclipse.edt/ibmi/org.eclipse.edt.ibmi.examples/

I'm not saying the attached project is perfect but it's a good starting point for a standard login that could be shared. It's stuff like this that would really help developers new to EGL.

In terms of master file maintenance, etc then I suggest you have a look at the 'Access a database with EGL RUI' tutorial available on the EDT project page, however I believe it's not perfect, you may need to tweak it to work with the version 0.8.2 of EDT ...

http://wiki.eclipse.org/EDT:Tutorials

Richard
Re: Screen Navigation Using EDT Eclipse [message #1061524 is a reply to message #1061391] Sat, 01 June 2013 19:57 Go to previous messageGo to next message
gio coot is currently offline gio coot
Messages: 22
Registered: December 2012
Junior Member
hi Richard

many thanks for you help; unfortunaly i'm using Rational RBD so your project and also
the project at http://code.metager.de/source/xref/eclipse/edt/org.eclipse.edt/ibmi/org.eclipse.edt.ibmi.examples/ don't work. So i tried to rewrite from the begin your IBMLogon but i have problem with import; If i write these few line i receive error in the import line; error is IWN.VAL.3260.e 3/16 The type com.ibm.as400 cannot be resolved. also if in my project in the build path i have added IBM i Utilities and tool box (see attached figure)

package server;
import com.ibm.as400;
program test
function main()
as400 AS400;
end
end


where i'm wrong
thanks in advance
  • Attachment: import.doc
    (Size: 124.00KB, Downloaded 86 times)

[Updated on: Sat, 01 June 2013 19:58]

Report message to a moderator

Re: Screen Navigation Using EDT Eclipse [message #1061531 is a reply to message #1061524] Sun, 02 June 2013 05:07 Go to previous message
Richard Moulton is currently offline Richard Moulton
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Gio,

I don't have RBD and I see you've already posted on the developerWorks EGL forum. I'm sure someone over there will be able to help.

Richard
Previous Topic:Open SQLResultSet
Next Topic:EDT Support External Types?
Goto Forum:
  


Current Time: Thu Aug 21 22:14:05 EDT 2014

Powered by FUDForum. Page generated in 0.02357 seconds