Hi,

With Orbeon Forms and betterFORM the xf:recalculate action causes an
immediate recalculation of calculated values in instances and this is
very useful when you have to update an instance and check or copy
calculated values in a single action.

With XSLTForms the xf:recalculation appears to be deferred and the
calculated values are not immediatly updated :( ...

A simple repro is:

<html xmlns="http://www.w3.org/1999/xhtml";
xmlns:xf="http://www.w3.org/2002/xforms";
    xmlns:ev="http://www.w3.org/2001/xml-events";>
    <head>
        <title>Hello World in XForms</title>
        <xf:model id="model">
            <xf:instance id="instance">
                <data xmlns="">
                    <source>foo</source>
                    <calculated></calculated>
                    <copied></copied>
                </data>
            </xf:instance>
            <xf:bind nodeset="/data/calculated"
calculate="../source"></xf:bind>

            <xf:action ev:event="xforms-ready">
                <xf:setvalue ref="/data/source">bar</xf:setvalue>
                <xf:recalculate></xf:recalculate>
                <xf:setvalue ref="/data/copied"
value="../calculated"></xf:setvalue>
            </xf:action>
        </xf:model>
    </head>
    <body>
        <xf:output ref="source">
            <xf:label>Source: </xf:label>
        </xf:output>
        <br />
        <xf:output ref="calculated">
            <xf:label>Calculated:</xf:label>
        </xf:output>
        <br />
        <xf:output ref="copied">
            <xf:label>Copied: </xf:label>
        </xf:output>
    </body>
</html>

XSLTForms displays:

Source: bar
Calculated:bar
Copied: foo

while of course, all 3 values should be "bar".

Thanks,

Eric

Eric


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to