I have some buttons on an XPage which need to prompt the user for some input, copy that input to a field on the current document and save the document. I want these buttons to work in both read and edit modes.
In the Notes-client version of the application, the buttons use LotusScript to display a dialogue box, and if the document is in read mode they just save the entered value to the backend document.
I’m trying to do this on an XPage as follows:
There is an Edit Box on the XPage inside a panel with style=display:none. This is linked to a field on the Notes form.
A button opens a Dojo dialogue box using the client onclick event. This button has no server events.
An “OK” button in the dialogue box has both client and server events. The client event should set the value of the hidden field from what the user entered, close the dialogue box, then return true to allow the server event to run. The server event should be able to read the value the user entered in the client dialogue box, then do some additional processing.
It all works with the XPage in edit mode.
In read mode, the hidden field appears as a span tag in the HTML instead of an input tag, and the value is not submitted, so no matter what the user enters in the dialogue box, the server event on the OK button can’t see that value.
Is there any way to make this process work with an XPage in read mode?