May 13, 2016, 10:22 AM
93 Posts


  • Category: Dojo and Client Side JavaScript
  • Platform: All
  • Release: 9.0
  • Role:
  • Tags:
  • Replies: 10

Another possibility, based on David's idea of using a repeat control, would be something like this (which I have recently just done myself)

In your repeat control, code 2 buttons, [Open Document] and [Edit Document]

Clicking each of these buttons, would then open the document in a modal window.

In the onClick event of the button's, do something like viewScope.documentMode ="editDocument" or "openDocument"

Then, for the default action property of the datasource within the modal, compute it to viewScope.documentMode

So clicking open, will open the modal is read mode, clicking edit will open the modal in edit mode. You are also never leaving the main page, just simply showing a modal, then hiding it again when finished.

I recently watched John Jardin's webinar "Optimus XPages: An Explosion of Techniques and Best Practices" in which he speaks about and demo's a single page application which might also give you some nice  idea's on alternative ways to achieve your goals.




Good luck!