Overview of Deferred Updates

Essentially, deferred updates are a mandated optimisation for groups of  
<setvalue/>, <insert/>, and <delete/> actions (and synchronous  
<submission/>s).

In general, an action being processed does not cause an update of the  
model until it is finished; all its changes are bundled together before  
updating. If it causes a change, the model is marked for either rebuild or  
recalculate.

However, that means that in order to work, some actions have to do an  
update before, and some have to do an update after their real task.

    show: update before
    hide: update before
    setfocus: update before
    setindex: update before, mark
    toggle: update before, mark
    asynchronous submit: update before, update after
    synchronous submit: update before, mark
              (so xforms-submit-done needs an update if it uses any values)
    reset: update after

    setvalue: mark
    insert, delete: mark rebuild

This means that any action that needs to use a value that needs to be  
updated, has to explicitely invoke <rebuild/> and/or <recalculate/>
(for instance <message/> needs to do an an update if it outputs a  
dependent value.)

Steven

Received on Friday, 31 March 2017 15:48:32 UTC