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



Mar 12, 2013, 8:51 PM
9 Posts

Dijit Dialog to execute SSJS

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: Dijit Dialog
  • Replies: 4
How to design a Dijit Dialog to execute Server-side JavaScript ?
Mar 12, 2013, 10:55 PM
586 Posts
Re: Dijit Dialog to execute SSJS
 Use the Ext. library or Update Pack Dialog.  Don't try and use straight Dojo Dialog manually.  It won't work correctly because it's moved out of the form tag.
 
 
Mar 13, 2013, 10:01 AM
9 Posts
Re: Dijit Dialog to execute SSJS
Thank you so much for the reply david,
 
I am just a beginner for these Dojo or Dijit controls or SSJS, so if possible could you please explain it bit detail to me. Your help would be much appreciated.
 
 
Thanks again.  
Mar 13, 2013, 2:05 PM
586 Posts
Re: Dijit Dialog to execute SSJS
 Howdy,
 
I can give you a brief example I think...  I can't get too detailed on Dojo as I'm just not an expert on all the inner workings.... 
 
XPages comes with Dojo built in.  It's the key framework that makes things like Partial Refresh and the Date Picker core control work.
 
Let's look at the date picker for instance.  You can drop that core control on and it will work.  Or you could manually apply Dojo to an edit box for instance and they use Dojo manually.  In this particular case I prefer the manual Dojo as I think it's better.
 
But what about DialogBox?  There is no core control for that.  So you could create a dialogbox manually - following the instructions on the dojo website - but that won't work in XPages straight for SSJS events as the dialogbox gets moved outside the form tag I believe.  So you can't save anything back via that dialogbox.  Now there is a workaround for this - Jeremy Hodge wrote a function that basically puts the dialogbox back inside the form tag.  You'll need to google for it...  but it's out there.  It's also used on several projects.  Mark Hughes's picklist project on OpenNTF has it I think. 
 
But there's a better way.  If you install the Ext. Library from OpenNTF, or the Update Pack from IBM then you'll get many Dojo tools available in your control pallet.  Dialogbox is one of them.  So no workaround needed.  Drag that to your XPage. There's a great Demo app that comes with XPages Ext. Library that has examples.  That demo might even be it's own project now... not sure. 
 
For you wanting to do dialogbox - use Ext. Library or Update Pack.  It will also be build into Domino 9.0 due out the 21st of this month I believe. 
 
There's a lot of material out there on Dojo.  though I don't think I have a lot of it on NotesIn9 yet...  I know I don't really have dialogbox on there.  Sometimes I prefer working with hidden/unhidden panels instead of dialogbox.  It's a little more mobile friendly. 
I did a session with Paul Withers - who's an XPages and Dojo Expert at Lotusphere.  Slides are here - maybe they''ll help a little. 
 
So again - you're best bet is to get Extension Library installed and dig through the sample app.  they've exposed much of Dojo that way.
 
good luck 
 
Dave 
 
Mar 14, 2013, 1:15 PM
9 Posts
Re: Dijit Dialog to execute SSJS
Thank you so much Dave, your reply was very helpful to understand about it. Cheers
 
 
 
 
 
 
 
 
 

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