Page 1 of 1

Populate Tab

Posted: Thu Mar 12, 2015 3:37 pm
by bgrassie
On the "Green Screen" I have a page that has an enter button that takes you to page 2. When I bring this into Genie It functions as it should...you hit enter it goes to the new page hit enter again returns you to the 1st so on and so on....

I would like to put this into a new tab automatically w/o the need for user input and the ability to just select the tab to see this information. I cant seem to get it work....Any suggestions would be greatly appreciated.

Thank you in advance.....

Re: Populate Tab

Posted: Fri Mar 13, 2015 12:44 pm
by Scott Klement
What problems are you running into?

Re: Populate Tab

Posted: Fri Mar 13, 2015 4:01 pm
by bgrassie
Scott, Im trying to put the information from page 2 onto tab 2 right now information stays on tab1...Im trying to get the information cleanly onto tab2 without any user interaction. Hitting enter works like a charm....but trying to avoid that.

Re: Populate Tab

Posted: Fri Mar 13, 2015 5:25 pm
by Scott Klement
A tab panel is used to organize the fields on a screen. It's actual just a special field within that screen -- so it really wasn't intended as a way to switch between multiple screens... just to organize stuff that's on a single screen by putting some fields on one tab, and some on another tab. Having said that, to do what you're asking, I can think of three different approaches:

1) You could create a new screen that combines all of the fields on the two screens. Then, in the Genie designer, move the fields for one screen to one tab, and the fields for another screen to another tab. This is probably the "right" way to do it, as it'll be the easiest to maintain over time. It's also the most intuitive for programmers, because all of the fields belonging to the screen are there together on one screen.

2) If it's important not to change the underlying screen, and easy technique is to 'fake it' by putting identical tab panels on both screens. On the first screen have a tab panel where the "active tab" is 0 (the first tab) and put all the fields on that tab. On the second screen, make the 'active tab' be 1 (the second tab) and put all of the fields on that tab. Use te 'ontabclick' property to run something like pressKey("Enter"), so that when they click the tabs, it pressees enter for them automatically. It'll therefore look like they are switching tabs when they click on the tabs, even though under the covers they're really switching screens.

3) The most complex method (and one I wouldn't really recommend) is to use JavaScript to navigate to both green-screens and read all of the field info from both screens and use it to build the tab panel. Then when they are finished, the same javascript can go and fil-in the underlying 5250 fields and submit both screens (for any input fields, I mean.) This would be complex to code and hard to maintain -- and I'd only do it as a last resort.