English 中文(简体)
Orbeon Xforms中计算作品的频率
原标题:How often will calculate works in Orbeon Xforms

我有一个绑定定义如下:

<xforms:bind nodeset="instance( demo )/pointer"
                        type="xforms:integer"
                        calculate="
                        if($current-page &lt;  2 ) then  0 
                            else (
                            if($current-page &gt;  2 ) 
                            then ($max-pages - 1)
                            else .
                            )"/>

每次用户单击表单,当前页面值都会发生变化。我想了解一下上面绑定定义中的计算执行频率是多少?

问题是指针变量和当前页面相互依赖,因此如果我首先单击某个内容,则应立即评估指示器的值,在下一条指令中,我必须根据更改的指针值设置当前页面

<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, those xforms:setvalue run first and the xforms:bind calculate runs later.
  • Pretty much all users interaction with the form will cause the xforms:bind calculate to be be reevaluated.
问题回答

暂无回答




相关问题
xform data grid

I am using orbeon to process my xforms. I am attempting to create a data grid that I can use to copy and paste rows/columns of data from my clipboard (excel). Do you have any clue how I can implement ...

Connect Chiba xForm to a restful web service (exist db)

I need to read an xml instance from an exist db. I am attempting to connect chiba to a restful web service via the following command: <xf:model> <xf:instance id="data-instance" ...

ISML PAC to XForm Conversion

Are there any tools or write-ups that can help in converting ISML PACs to XForms? Does anyone have experience in such a conversion?

XForms: how to deal with instance data that changes?

At the moment I am working on an XForms application to mutate XML data. This data comes from a local XML file. The file is exported from another application in a static way and read into the ...

Client side XForms processing tools [closed]

What would be the best client side javascript based XForms processor? I m trying to migrate plugin (activeX) based Xforms processing solution to a javascript based client side processor. But the ...

Default Values in XForms Input

I have an XForm that has certain fields that may often be left blank (optional street address). Is there is technique to set a default value for that field, preferably a space (I am running into weird ...