Xpages document changing document mode? -


i have strange thing occurring; usual, can't post code, unfortunately, i'm describing problem in case can suggest possible cause.

i have xpage custom control included on it; custom control handles document locking , changing edit/read-only modes via links. document locking done setting applicationscope variable based on unid. make more friendly other users on system, run function periodically on page check whether document locked or not , update link/label/tooltips appropriately (e.g. if locked user, "edit" button disabled; when lock released, it's re-enabled). done calling "xagent" through standard, simple dojo-based ajax call.

for reason, behavior of system gets erratic after 45 seconds minute. i'm checking lock status every ten seconds or so, it's not happening first call. i'm displaying list of records associated document; each record row in repeat. when first go edit mode, controls displayed should be, i.e. editable. if user changes particular value combobox, updates whole row partial refresh. when things erratic, noticed row starts refreshing in read-only mode, suggests me document changing edit mode. time knowingly change edit mode if "cancel" or "save" button pressed. (the locking mechanism doesn't have edit mode.)

it seems ajax call i'm making @ root of this. i've stripped xagent , client-side code down practically nothing, , it's still happening. can't see causing behavior. can hazard guess? thanks....

maybe check if server log file has warnings like:

warning clfad####w: state data not available /page because no control tree found in cache.

if you're seeing warnings, server can no longer find current xpage page instance in cache. in case page revert initial state, when page first opened. might why document goes read-only mode.

the session cache of server-side page instances holds 4 pages when xsp.persistence.mode=basic, or holds 16 instances when xsp.persistence.mode=file or fileex.

if load 4 xagent page instances, fill cache, , no longer able find page instance current xpage viewing. xpage stop performing server-side actions, , partial refresh show initial state of area of page.

to avoid problem, in xagent page can set viewstate="nostate" on xp:view tag, page instances not saved xagent page, described here: https://tobysamples.wordpress.com/2014/12/11/no-state-no-problem/

or else can create , reuse 1 page instance xagent, 1 created. is, on first call xagent, have xagent return $$viewid value xagent page instance (#{javascript:view.getuniqueviewid()}), , in subsequent requests xagent use $$viewid in request, restore existing xagent page instance instead of creating new instances fill cache. subsequent xagent requests so:

/myapp.nsf/xagent1.xsp?$$viewid=!aaaaaaaa!


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -