I have a bind definition as follows:
<xforms:bind nodeset="instance('demo')/pointer"
                        type="xforms:integer"
                        calculate="
                        if($current-page < '2') then '0'
                            else (
                            if($current-page > '2') 
                            then ($max-pages - 1)
                            else .
                            )"/>
For every user click on the form, the current-page value changes. I wanted to understand how often does the calculate in the above the bind defnition execute? 
The problem is that the pointer variable and current-page are dependent on each other, so if I click on something first, the value of pointer should be 开发者_Go百科evaluated immediately and in the next instruction I have to set the current-page value based on the pointer value that is changed. On the click, the code will be as below:
<xforms:setvalue ref="$pointer"
                 value="($pointer + 1)"/>
<!-- i am assuming if the current-page is 2,
     it will increment, else the value is set as per calculate -->
<xforms:setvalue ref="$current-page"
                 value="($current-page + 1)"
                 xxforms:if="($pointer = $max-pages)" />
- When users click on the button (assuming it is a button) that trigger the two  xforms:setvalue, thosexforms:setvaluerun first and thexforms:bind calculateruns later.
- Pretty much all users' interaction with the form will cause the xforms:bind calculateto be be reevaluated.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论