Heya all,I m looking for information about the following problem :
in the application i m developping, i have a dijit dialog box (dijit. Dialog). I am opening in this dialog box an xpage (via dijit.Dialog.setHref, so asynchronously)
The xpage loads ok (and either opens an existing document, or creates a new one depending on a url parameter).
However, i dont manage to have it save in the dialog.
It saves ok if i open it directly, but the OK button does nothing (no request in firebug) in the popup.
it looks like the xpage OK button launches no client/server request in this context.
Does this mean XPAGES only work when called directly and cannot be loaded via Ajax request?
I got real complex stuff to put in this XPAGE, and i really would like not to have to code it in the calling xpage.
Any suggestion?
Thanks a lot.
my code hereafter (again, loading works fine so i dont include loading functions. the categoryAdminDocument document data source is OK)
In order to work properly, an XPage control needs to be within a form, so the data can be POST’d to the server. For this, the xp:view tag automatically generates an HTML in the target page. Works perfectly.
Now, the Dojo dialog requires the dojo content to be placed as a child of the tag. Well, this is not true but this is what the Dojo team choose to do. So the dijit.Dialog is moving its content to the body tag on postCreate, putting it then outside of form, thus breaking the post.
We are currently communicating with the Dojo team to get a fix for this.
That right there gets me drooling. I absolutely love the IBM<>Dojo strategy that’s been put in-place with xPages. Contributions from the Open Source community PLUS directional input from IBM (and more specifically, the Lotus team) – it’s a Good Thing ™.
the id parameter of the workaround fonction is both the id of a div that will define the combobox layout (put in that div any field and buttons and so on that you whant in yout dialog box).
That id will also be the widget id (accessible through dijit.byId()) of the Dialog Box.
An example of how we use it : (xc:dialog_security_edit/ is a control containing anything inside dialog)