FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.



May 13, 2016, 10:22 AM
93 Posts

Modal?

  • 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.

Slides: http://www.slideshare.net/Teamstudio/optimus-xpages-an-explosion-of-techniques-and-best-practices

Recording: https://youtu.be/8LEBYhp73nk

 

Good luck!


FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.