If I understand the documentation correctly, I should be able to add an “Open Popup Features” control to a page, settings its properties to control how a modal window appears. Below is the description from the documentation.
This control is intended to be used in the page that opens the pop-up dialog. An example for the usage of the control is provided in the library SYSEXNJX, program CTRPOP-P.
I have created a very simple page and added this control to it and the adapter automatically changed to have the following in the parameter area.
2 FEATURES (A) DYNAMIC
2 HEIGHT (I4)
2 LEFT (I4)
2 POPUPTYPE (A) DYNAMIC
2 TITLE (A) DYNAMIC
2 TOP (I4)
2 WIDTH (I4)
The adapter also passes all of these parameters in the PROCESS PAGE statement. All looks right at this point. Once I try to run the page however, I receive “TBTESTUI 0020 NAT5471 Identifier xciopenpopup.features is not defined in layout /rn2/TBTESTUI. - Error code 5471 was received from Natural”.
Unfortunately, the sample program CTRPOP-P does not appear in my SYSEXNJX library so I cannot use it as a reference. Has anyone successfully implemented this control and can you provide any advice on getting it to function correctly? I have included a zip of my current code.
Open Popup Features Example.zip (1.59 KB)
usually when you receive messages like this indicating a “mismatch” this is a browser cache
issue, can you please try to close the (all) NJX session(s), open the browser anew, clear
the browser cache and try again.
Thank you Wolfgang. That does appear to have been the problem. It still isn’t doing quite what I want it to but at least I’m moving forward now. Thanks again!
Thank you for the interest Wolfgang.
There are actually a couple issues I haven’t been able to figure out. The first and the most minor is that I don’t seem to be able to get the xciopenpopup.features parameter to have an effect. The other parameters appear to be affecting the popup just fine. The bigger problems are as follows. Consider the following process:
P1 issues a PROCESS PAGE. From this page, a button causes a FETCH RETURN to P2 where another PROCESS PAGE occurs. A button on this page does a PROCESS PAGE MODAL.
After exiting the MODAL is where the problems begin. After hitting the END-PROCESS, if I don’t perform a PROCESS PAGE UPDATE to P2s page, the MODAL window isn’t disappearing. Regardless of performing the PROCESS PAGE UPDATE, by the time I return to P1 and process its page again, a NAT1107 occurs.
As far as I can tell, I am executing similar logic to the example program SYSEXNJX\EMPTY-P which does not error after returning to SYSEXNJX\MENU-NJX but I am not having much luck in determining why my process is different. I’ve attached my sample code as that is probably easier to follow than my description.
Again, thank you.
Example.zip (9.99 KB)
Ultimately I have fixed my problem with NAT1107. To recap, I was attempting to create a modal window where a user would confirm they wanted to leave the current page. On confirmation, the user would be returned to the page previous to the one they were on (page1 > page2 > modalConfirmPage > page1) with no further user interaction.
SAG support confirmed I could not return to page1 directly but I don’t think I was clear enough about what I was trying to do. I was able to get the user back to page1 with no further steps by adding a njx:triggerevent control to the page calling the modal dialog. If the user confirmed exit in the modal dialog, the xcitriggerevent property is set to a method and page2 is reprocessed, immediately triggering the exit page method.
I hope this helps someone else.
That is indeed the way to achieve what you want to do.
I have just one remark about openpopup and living popup
OPENPOPUP has to be put on the page that opens the popup and it has to be set before displaying that page.
If you want to change the properties of a second popup
page1 → popup1
→ popup2 → page1
you will need to use the livingpopup control
XCI:TRIGGEREVENT has been a really helpful addition for me!