问题
Scenario:
- User preview xpage for editing in web browser.
- Developer replicate a local replica to the server.
- User click save button and trigger save action partial/full refresh
In 8.5.2 crash the whole database based on can't find java design classes. In 8.5.3 no error CS/SS accrued but there are no changes applied to the document. Seems like if you replicate the sessionID is overridden. Is there a way to fix/detect it?
Any ideas?
thx
回答1:
It relates to this effect: Meaning of java.lang.ClassCastException: someClass incompatible with someClass.
Simply said, every design change resets XSP engine. Since 8.5.3 you can control it by property "Refresh entire application when design changes
" in XPage properties - turning it off (default since that version) will just "soft reset" XSP engine.
Anyway, you may loose some scoped variables and beans. This concludes to some rules to obey:
- Do not allow developers to change design in production during working hours.
Notify users about the problem (
onError event for partial refresh) - Tim's comment explains, that you won't get an error from partial refresh after design change, unfortunately. Simple CSJS code pinging app availability and report problem when app does not respond could work, but I don't advise that: we use "keep alive" control from ExtLib, and troubleshooting in domlog.nsf became a nightmare - it is full of pings (almost all the time - many users keep their browsers open overnight).If data are very important, implement auto save mechanism similar to Google apps.
BTW: This effect is similar to time-outed session - partial refreshes will fail and user need to reload the page (and possibly loose edits).
来源:https://stackoverflow.com/questions/19115096/xpages-partial-refresh-cant-save-after-replicate-local-replica