-
In days of yore I ran code in postOpenDocument on the Form and all was well. I have postOpenDocument in XPages, but I can’t simply call legacy code from there like I could on a Form. I have to encapsulate it in a Agent in order to launch it. I have recently discovered I can’t save the document that’s defined as the data source, in postOpenDocument, or postSaveDocument will never fire, and data will never actually be saved. So the parameter document method I use in postSaveDocument is right out.
-
Another sort of sticking point is that postOpenDocument is a server-side event now, not a client-side event. If it were client-side I’d do an AJAX call and be done. Can server-side even do that? If it can, is the code the same as client side? (dojo.xhrPost(), etc) Or do I have to fall back to the old way?
-
If it can’t do that is there some alternative place I can put a legacy Agent call that will it to run before the page is loaded? Far as I know every single event on a XPage is server-side, so even beforePageLoad won’t work any different than postOpenDocument, it just happens at a different time. I’m not aware of any way to touch off an Agent from the client until after the page is rendered, and then it’s too late.
Thanks for your time…
EDIT:
The Domino wiki says not one thing about this that I can find. Searching for postOpenDocument gives zero hits. Searching for “XPage AND WebQueryOpen” gives three hits, none of which are relevant. “server-side AND AJAX” yields four hits, none of which are relevant.