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:
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: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: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