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

I'm still a no-go at this station....

- First off, I greatly appreciate your time and effort, Judy. One would think with all that input I could make this work. Sadly I have not.

My button to show the dialog looks like this:

<xp:button value="eDocs Comment" id="Comment" title="Upload a comment to eDocs" icon="/actn130.gif" styleClass="actionBarBtn">
<xp:eventHandler event="onclick">
<xp:this.script><![CDATA[
dijit.byId('#{id:dlgWFNote}').show();
]]></xp:this.script>
</xp:eventHandler>
</xp:button>

I changed it based on your example. Originally it had:

return showMe('#{id:dlgWFNote}', 'Upload eDocs Comment');

as the script. When I changed it to remove the return, the dialog was no longer "modal", in that it would not wait for user input. It presented, stayed about a second, then auto-dismissed. If I'm real quick I can type something and click a button, but no matter what I do, the result is the same.

- The custom control containing the dialog looks like this:

<xp:this.resources>
<xp:dojoModule name="dijit.Dialog" />
<xp:dojoModule name="dijit.form.Textarea" />
<xp:dojoModule name="dijit.form.Button" />
</xp:this.resources>
<xp:div id="dlgWFNote" dojoType="dijit.Dialog" style="display:none;width:50%" title="Upload comment">
<xp:text value="Enter comment to be uploaded to eDocs:" style="display:block" />
<xp:inputTextarea id="dlgWFComment" value="#{Ticket.Comments}" style="min-height:10em;display:block;width:95%" />
<div style="text-align:center">
<xp:button dojoType="dijit.form.Button" id="btnWFSend" value=" Add Comment" type="submit" icon="/actn010.gif">
<xp:eventHandler event="onClick" submit="true" immediate="false" save="false" id="Accept" refreshMode="complete">
<xp:this.action>
<xp:saveDocument />
</xp:this.action>
<xp:this.script><![CDATA[
var xpAct=dojo.byId("#{id:xpAction}");
xpAct.value="WFN:"+dojo.byId("#{id:dlgWFComment}").value+"]";
alert("xpAction: \""+xpAct.value+"\"");
dijit.byId('#{id:dlgWFNote}').hide();
return true;
]]></xp:this.script>
</xp:eventHandler>
</xp:button>
&#160;-&#160;
<xp:button dojoType="dijit.form.Button" id="btnWFCancel" value=" Cancel" type="button" onclick="dijit.byId('#{id:dlgWFNote}').hide();" icon="/actn011.gif" />
</div>
</xp:div>
<input type="hidden" name="dlgWFTest" value="dlgWFTest" />
<xp:scriptBlock>
<xp:this.value escape="false"><![CDATA[
dialog_create("#{id:dlgWFNote}", "Upload comment");
]]></xp:this.value>
</xp:scriptBlock>

I added the dialog_create() at the bottom because you have it. If I put dojo.addOnLoad(dialog_create()) in the script block I get an error, but this straight dialog_create() seems to work. After putting that in, it did start running the CSJS (as indicated by the alert popping), and it does trigger some server-side activity, but only an afterRestoreView. It will not actually save, or run any save events on the data source.

I have tried every variation of immediate, save, and submit. The most I can get it to do is run afterRestoreView.

- I do not have a data source associated with any dialog. There is only the data source on the XPage that the dialogs are on, which is named "Ticket".

- Here's dialog_create() and show_me(), in an included client-side library:

function dialog_create(id, title1) {
var dialogWidget=dijit.byId(id);
if(dialogWidget && dialogWidget.destroyRecursive) dialogWidget.destroyRecursive(false);
dialogWidget=new dijit.Dialog(
{title: title1},
dojo.byId(id)
);
var dialog=dojo.byId(id);
dialog.parentNode.removeChild(dialog);
var form=document.forms[0];
form.appendChild(dialog);
dialogWidget.startup();
return dialogWidget;
}
/* Display a dijit dialog based on a Custom Control, creating it if necessary
Based on a R8.5 Notes.net forum post by Lothar Mueller, and dijit web research
*/
function showMe(dlgName, dlgTitle) {
var dlg=dijit.byId(dlgName);
if(dlg) dlg.show();
else {
dlg=dialog_create(dlgName, dlgTitle);
if(dlg) dlg.show();
else {
alert(dlgName+" explicit create failed");
return false;
}
}
return true;
}

Previously I had this code at the bottom starting from the line "var dialog=..."

dojo.body().appendChild(dialogWidget.domNode);
dialogWidget.startup();
return dialogWidget;

which is based on xpagesblog dialog samples.

- If I put the showMe() call back, it's being typcially flakey. Before I replaced "return showMe(...)" with "dijit.byId(...).show()", it would wait for user input. Now that I've put "return showMe()" back, it will no longer wiat for input. No matter what I do, it pops the dijit dialog and immediately dismisses it. Period. The only line I changed is the button to invoke the dialog, yet it's behaving differently. This is the story of my entire XPages experience. Disastrous inconsistency.

- The dialogs are all what should be painfully trivial things, like requesting some input and saving the document. In R-prior this would have taken minutes to build a Form, present it in a pop-up, and do a document.sumbit() to trigger WebQuerySave. Minutes.

I'd appreciate any input at all. Meantime I'm going to try the hokey pop-up window method. I've squandered so much time on what should be a cake walk that it's not even remotely funny...


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

Stuck on dijit dialogs again... (~James Brewever... 25.Jun.10)
. . I'll waddle in .... (~Rebecca Brefoo... 25.Jun.10)
. . . . Thanks Judy... (~James Brewever... 29.Jun.10)
. . . . I must be missing something... (~James Brewever... 30.Jun.10)
. . . . . . Maybe a simple example might help .... (~Rebecca Brefoo... 30.Jun.10)
. . . . . . . . The client-side JS for the dialog (~Rebecca Brefoo... 30.Jun.10)
. . . . . . . . I'm still a no-go at this station..... (~James Brewever... 30.Jun.10)
. . . . . . . . . . Ach, I feel your pain ... (~Bella Elfreema... 30.Jun.10)
. . . . . . . . . . . . I'm game... (~James Brewever... 30.Jun.10)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS