Often, we want to confirm with the user that they actually want to save or submit a document in XPages. I thought it would be very simple to customize the server-side simple action ‘confirm’ to include client-side data that the user had just entered, but that was not yet saved to disk.
So, I had what I thought was some simple and straight-forward SSJS:
I posted my question on StackOverflow and Paul Withers pointed out that I wasn’t going to get what I was looking for….
You’re computing SSJS to pass to a CSJS confirm() message. I would expect it to display values at the last refresh, not values just entered by the user. If you want the latest values, I think you’ll need to access them via CSJS.
Hopefully, my mistake will prove instructive in your attempts to find your way in XPages…..
I typically use SSJS for this. It’s more work but seems doable. I’ll have a button and that button doesn’t do anything other then ask the question. Either via a panel where I turn rendering on or in a dialog box. Then a second button in that dialog box/panel then “Yes – I’m sure” actually does the work. This also gives me the ability to get a little more information… like “How Many?” and then pass that into the function that needs it.
just a thought.