Questions about the <Xhtmlb:*> rendering library.
How to prevent a form from been submitted twice?
We have added a new tag
<xhtmlb:protectDoubleSubmit> which tries to solve the problems of double submit. Once a request is submitted, immediately a transparent image is layered over the window, which will catch on clicks onto the screen. If after a few moments (2 seconds) no answer is yet received from the server, a small popup window is displayed, showing a "working..." message. (Which might be annoying in some cases, so use only when required.) For an example, see:
timer attribute to better adjust the popup times to the specific behaviour of the application.
How to reduce the "flickering" effect of <xhtmlb:protectDoubleSubmit>?
Problem is that the popup on screen costs time to transmit down the line and to render in HTML. Often, also users find the movement on screen very annoying. A new attribute
design = POPUP | STATUSBAR has been added (620SP55, 640SP14 & 700SP05). With the new design STATUSBAR, the message is written to the browser status line instead of a popup window.
How to handle printing or downloading while using <xhtmlb:protectDoubleSubmit>?
Problem: We've implemented a print functionality where after submitting a form, a new PDF document is created on the server. This new PDF document is written either directly in the HTTP response, or the HTTP response contains a redirect onto a new URL from which the PDF document can be downloaded. The PDF is displayed in a separate AcrobatReader window. The old browser window does not get any HTTP response, which means that the <xhtmlb:protectDoubleSubmit> will bring a popup window to show that the application is working, and the application then stays indefinitely in the state of displaying the 'Please wait..' window. The user is blocked from any form of activity and is forced to close the browser.
Solution: The print button implements sets the
onClientClick attribute so that the popup will be displayed for a short time and then be removed.
In that way the user is not confused and able to continue to work in the old browser window while the document is displayed in a new browser window.