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

Maybe a simple example might help ...

I'm not sure if what I did will be equivalent to your scenario, but I'll lay it out for you. You might need to deconstruct your solution to the bare minimum then build up its complexity.

I have a document opened in EDIT mode, very simple, just an XPage for attachments. That XPage has the usual settings set to allow dijit.Dialogs to work -- dojoParseOnLoad=true & dojoTheme=true & a dojoModule Resource of "dijit.Dialog" & the client-side JS script library included as a Resource. (Actually, you might not need all of that on your XPage if you put it on your custom control.)

And, a button that will show the dialog:
<xp:button id="button1" value="Add Attachment"
styleClass="lotusBtnAction" style="margin-left:10px">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[ dijit.byId('attachDialogBox').show();]]></xp:this.script>
</xp:eventHandler>
</xp:button>
Pretty standard fare.

Then my custom control that contains the dialog -- I initially set up a Data source so I could bind the fields to edit boxes, etc. then removed the Data source at the end.
I have a [Save] & [Cancel] button & am showing the "X" top-right default button on the dialog:
The SAVE button is just a regular "Button" -- not sure why I ended up with an action group in there, probably not necessary:
<xp:button id="button1" styleClass="lotusBtnAction"value="Save">
    <xp:eventHandler event="onclick" submit="true"id="eventHandler1" immediate="false" save="false"refreshMode="complete">
<xp:this.script><![CDATA[dijit.byId("attachDialogBox").hide();]]></xp:this.script>
        <xp:this.action>
<xp:actionGroup>
<xp:saveDocument></xp:saveDocument>
</xp:actionGroup>
</xp:this.action>
</xp:eventHandler>
</xp:button>
And, the CANCEL button is a "Cancel" button & just returns to the underlying document:
<xp:button value="Cancel" id="button2"styleClass="lotusBtnAction">
    <xp:eventHandler event="onclick" submit="true"refreshMode="norefresh" id="eventHandler2" immediate="true" save="false"></xp:eventHandler>
</xp:button>
At the bottom of the control I've got a script block to load the dialog:
<!-- Script to load dialog box. Calls function in dialog javascript library -->
<xp:scriptBlock id="scriptBlock1" type="text/javascript">
<xp:this.value><![CDATA[dojo.addOnLoad(function(){
dialog_create('attachDialogBox','Attachment ...');
    // hide the "x" button on the dialog box title bar //dojo.style(dijit.byId('attachDialogBox').closeButtonNode,'display','none');
}
); ]]></xp:this.value>
</xp:scriptBlock>

In action, when the dialog pops up you can see the initial Description on the underlyiing document & my new additions in the dialog.

Then when the [Save] is clicked the fields on the underlying document are updated -- the Description & my new attachment is showing:


The only difference to your situation is you have the data source defined on your dialog & you want to run some postSaveDocument code when the [Save] button is clicked.

In my actual implementation I'm doing something very much like that except I call my Dialog from a different opened document & am creating a brand new Attachment doc & am running the postSaveDocument agent -- it seems to be working. The only thing you need to remember if you've got multiple data sources is to set "ignoreRequestParms" to "true" on the one in your dialog/custom control.


Feedback response number JKIN86WK5X created by ~Denise Zenfreetexjip 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