Switching screens inside one format

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
mkilp
New User
Posts: 3
Joined: Fri Dec 14, 2012 4:25 am
First Name: Marvin
Last Name: Kilp
Company Name: T-Systems International GmbH
Contact:

Switching screens inside one format

Post by mkilp »

Hey there,

we are experiencing problems while using DDS converted formats in a php script.
We created a simple test format with 2 screens and now we simply want to switch to the second format by pressing the F9 function key.

At the moment we created a button with the onClick event pressKey("f9").

But we get an error:

Code: Select all

OnClick Error: Object expected
we already tried to work with the documentation, but there is not that much info about switching between screens in 1 format.

Below is our php code:

Code: Select all

<?php 
 $view = '/profoundui/userdata/dspf/HelloWorld2.json';  
$output = array('view' => $view, 'screen' => 'DIALOG01'); 
 echo json_encode($output);
 ?>
The second screeen is called DIALOG02.


I hope you are able to help us and if further questions occur feel free to ask.

Kind Regards,

Marvin
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Switching screens inside one format

Post by Scott Klement »

HI Marvin,

pressKey() Is a Genie API. Genie is a tool that works like a 5250 emulator that translates 5250 screens on-the-fly to web pages. That's not what you are using, here. There's no 5250 screen involved here at all, you're displaying a Rich Display using our JavaScript framework.

I'm having a hard time understanding what you're trying to accomplish here. How does F9 relate to switching screens? Can you clarify how your screen works?
mkilp
New User
Posts: 3
Joined: Fri Dec 14, 2012 4:25 am
First Name: Marvin
Last Name: Kilp
Company Name: T-Systems International GmbH
Contact:

Re: Switching screens inside one format

Post by mkilp »

Hi Scott,

first off: thank you for your reply.

The function key f9 switches the screen inside the *pgm behind the format file.

For better understanding i give you an example:

You start in the format DIALOG01.
There you can do some input.
Then you press F9 and now you are in DIALOG02.

Note: DIALOG01 and 02 are the name of the screens.
Thats how our simple testpgm works.

regards,

Marvin
kfritz
Profound User
Posts: 64
Joined: Thu Aug 04, 2011 4:53 am
First Name: Karl
Last Name: Fritz
Company Name: Logic IT Services
Address 1: Fluhgasse 141
City: Laufenburg
Zip / Postal Code: 5080
Country: Switzerland
Location: Switzerland
Contact:

Re: Switching screens inside one format

Post by kfritz »

Define the button as F9 button and give the "response" property the bound value *in09 or what ever you want. This returns the indicator value back to your RPG program. You don't need pressKey (as Scott explained a Genie function) or a pui.click event. This should work.

I assume you're using the F9 key instead the enter key.
mkilp
New User
Posts: 3
Joined: Fri Dec 14, 2012 4:25 am
First Name: Marvin
Last Name: Kilp
Company Name: T-Systems International GmbH
Contact:

Re: Switching screens inside one format

Post by mkilp »

Well, i already defined the response to *in09 and it didnt work.

May it be a problem that my program behind the format is written in JCL?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Switching screens inside one format

Post by Scott Klement »

mkilp wrote:The function key f9 switches the screen inside the *pgm behind the format file.
This sounds like you're using Genie? In Genie, you use existing programs with existing 5250 screens, and the screens are transformed on-the-fly. Genie is really a 5250 emulator that converts old-style screens to web pages as you run them.

However, the code you posted is PHP code that's displaying screens created as Profound UI Rich Display files. All it does is display screens from your PHP program. The only program code that's running is the PHP code, itself.
mkilp wrote: You start in the format DIALOG01.
There you can do some input.
Then you press F9 and now you are in DIALOG02.
That description would make sense (again) if you were displaying 5250 screens in Client Access or in our Genie product. It does not make sense, however, given that you are writing a PHP script for a web application.

If you want to handle the F9 key, as you describe, you have to have the F9 assigned to a button -- the button would submit the screen back to your PHP program, which would then check for F9, and you'd then have logic to switch to another screen.

The two screens would be separate formats (not "1 format" as you said in yoru first message.)
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests