Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

Thanks Simon. But how do you get it to save?

- I managed to get it to present the dialog, using either "plain" markup (as the page you refer to, which I used as a model), or using <xp:..> automagic markup (using the xpagesblog sample as a model). But it won't run any server-side actions, ie, <saveDocument> won't work. Or it does work. One time and one time only. Here's the scenario:

1. User clicks button.

2. Buttons presents dialog.

3. User enters data, selects from a drop down, etc. In this instance I'm confining myself to one text area and one text area only.

4. If user accepts, put data in a known field and save the document. This runs postSaveDocument, which runs an Agent, which runs piles of legacy code based on the value of the known field.

5. If the Agent indicates success, we're done. One save is all we need.

6. If the Agent indicates failure, reload the current page with a message in panel. At this point the user could do any number of things, including return to step 1.

Whatever the user does, after step 6, they will most likely save the document a second time, which should trigger postSaveDocument a second time, which should run the legacy code a second time. But it doesn't. After the first invocation, postSaveDocument will not run again on that page, until it's completely unloaded (as in navigate to another page entirely) and reloaded. Then it will run postSaveDocument once, until the next reload, and so on.

- I changed it to use the <xp:...> automagic markup so I could move the <xp:saveDocument /> action into the dialog itself, instead of attempting to pass a value back from the dialog to tell the invoking button whether to continue or not. This is how it's done on the xpagesblog site sample, and it seemed like it should be less hassle to do it that way. Alas that did nothing at all ... under no circumstances would it trigger or run any code, client or server side, under the <xp:eventHandler> tag directly on the dialog. Ever.

- To get it to run a save at all I had to use the xpagesblog trick of running a server-side event from client side code. A "simple" <xp:saveDocument /> on the dojo dialog button simply would never trigger.

- This thread:( Database 'IBM Lotus Notes/Domino 8.5 Forum', View '(NotesThreads)', Document 'I'm still a no-go at this station....') is similar to the current one, but contains different information, including relatively current source. The primary difference between that source and what I have now is that the "Add Comment" button does not have an <xp:eventHandler>, it has onclick="dlgWFNSubmit()", and it runs the following client-side code:

function dlgWFNSubmit() {
var xpAct=dojo.byId("#{id:xpAction}");
xpAct.value="WFN:"+dojo.byId("#{id:dlgWFComment}").value+"]";
dijit.byId('#{id:dlgWFNote}').hide();
executeOnServer("saveOnly");
alert("Ran: \""+xpAct.value+"\"");
return true;
}

The "executeOnServer()" function is a literal cut and paste from here:

http://xpagesblog.com/xpages-blog/2010/4/15/programmatically-triggering-an-xpages-server-side-event-hand.html

So I still don't see how what is supposed to be trivially simple functionality can go so horriby awry. If you could theorize on that I'd be happy to hear what you come up with.


Feedback response number DGIE86WR6F created by ~Holly Zekhipisonnivu on 06/30/2010

Question for someone who'd actually... (~James Brewever... 30.Jun.10)
. . I've done it with Dojo samples. (~Rex Pretoolito... 30.Jun.10)
. . . . Thanks Simon. But how do you get i... (~James Brewever... 30.Jun.10)
. . . . The dialog is under the body tag, t... (~James Brewever... 2.Jul.10)
. . *bump* -> Still not working... (~James Brewever... 1.Jul.10)
. . . . Have you seen this post (~Martha Umtumis... 6.Jul.10)
. . . . . . Thanks David... (~James Brewever... 6.Jul.10)
. . . . . . . . Dialogs... (~Martha Umtumis... 8.Jul.10)
. . . . . . . . . . Dunno, I'll give it a go and see. ... (~James Brewever... 8.Jul.10)
. . . . . . . . . . . . same error message (Dialog into a r... (~Pippy Elavitch... 9.Mar.11)
. . . . . . . . . . . . . . It seems like your error is not the... (~Zelda Ekresask... 11.Mar.11)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS