I am having a development issue that I am hoping someone has run into before (and presumably resolved!).
I have an XPage that displays a document, and I want to allow users to add comments to the document.
I have successfully incorporated the “comment” feature used in the “XPages Wiki” project on OpenNTF (OpenNTF.org - The Open Source Community for Collaboration Solutions).
I can add comments, and they are created as separate response documents and displayed perfectly.
The issue arose when I ventured into unfamiliar territory (that’s a pretty big space!), and tried to enhance the feature so that the addition of a comment appeared as a dialog box instead. In the Wiki project, a space for comment posting is always visible - I wanted to have users click a link to expose a dialog box where they could post their comments.
I used Dec’s “Advanced XPages : A Nicer Domino Login” tutorial (Advanced XPages : A Nicer Domino Login Part 1 | Dec's Dom Blog) to learn how to display and use a dialog box to offer login facilities - worked beautifully.
OK, so the problem came when trying to apply what I had learned about Dojo from Dec to my original development…
I have a custom control that contains a couple of fields: author & comment.
All of the necessary Dojo resources are loaded in the custom control, and the entire contents is surrounded by a DIV with a dojoType of “dijit.Dialog”.
I placed a link on my XPage that successfully displays the new dialog box, and accepts comment data.
However… No matter what I do, the comments are never saved and response documents are not created.
I have placed two buttons in the custom control to try and determine the source of my issue.
The first button contains all of the original server-side script that works fine if the feature resides outside the dialog box. This button never seems to fire at all.
The second button simply issues an alert and hides the dialog box - That works fine.
I found that if I change the “server options” of the second button to anything other than “no submission”, it won’t work either.
So, I believe that my issue relates to the use of server-side script or data submission within a Dojo dialog box.
That’s my best guess, but I wanted to throw this out there before I spent hours trying to fiddle with something that may not be supported.
Am I attempting something that is not possible?
Can someone point me in the right direction?
I have started trying to locate resources (with examples) to learn more about Dojo (I’m more familiar with jQuery), so any links that y’all may be able to provide would be most appreciated as well.
Cheers!
T.