The UI language
The element ui:server-popup
<ui:popup page="sample"/> <input type="button" onclick="open_sample('width=100,height=100', 'forty-two')"/>The page, here sample, must set the attribute popup to yes:
<ui:page name="sample" popup="yes"> ... </ui:page>This is necessary because the generated HTML code is slightly different from that of normal pages.
Keep in mind that the dialog object is copied for the time of the popup generation. If the main window is submitted, the original object will continue to be the active object, and the duplicate is silently dropped. If the popup window is submitted, however, the original object will be dropped, and the copy will be used instead for all future interactions!
The popup window can include interactors like text boxes, selection lists, etc., as well as buttons and hyperlinks. If the popup window is submitted, the variables of the duplicated dialog are updated from the interactors of the popup page, the popup window is closed, the main window is discarded (!), the trigerred event is sent to the dialog, and the resulting page will be displayed in the main window using the copied dialog object as current object. Note that these actions are very different from what happens for submitted popup windows generated by ui:popup. Especially, the interactors of the main page are not used to update any dialog variables.
If the main window is submitted when there is an open popup window, the popup window is closed, and the underlying duplicated dialog object is discarded.
It is only possible to have one open popup window at the same time. Trials to open more than one popup window are silently ignored.
The popup window is automatically closed when any submit button or hyperlink of the main window is pressed, or when the page currently displayed in the main window is left by other means. In these cases, the user interactions in the popup window are ignored, and the copied dialog object is dropped.
Note that WDialog generates an ONUNLOAD handler for the main window and a ONSUBMIT handler for the popup window.
Level: Generative element
<!ELEMENT ui:server-popup EMPTY> <!ATTLIST ui:server-popup page NMTOKEN #REQUIRED>It is required that there is a ui:form in the current page; however, the ui:server-popup element can occur outside the ui:form element.