Re: Re: Re: Orbeon 3.7.2 ?

Posted by Erik Bruchez on
URL: https://discuss.orbeon.com/Orbeon-3-7-2-tp1415236p1470882.html

Maciej,

That bug is an interesting one.

There is a difference between using @bind and @ref. The reason is that
XForms 1.1 says:

"XForms Actions that change only the value of an instance node results
in setting the deferred update flags for recalculate, revalidate, and
refresh to true and making no change to the deferred update flag for
rebuild for the model over which they operate. The XForms Actions in
this category are: setvalue setindex"

and:

"Form controls that write simpleContent to instance data must do so
exactly as defined by the XForms Action setvalue"

So what happens when you change the value of the select1 in the UI is
that a setvalue is done on the data. This does NOT cause a rebuild, so
the bind node-sets don't reevaluate.

However, the UI bindings do reevaluate during refresh. Since we don't
have a dependency mechanism between the UI and the model, we
reevaluate all the bindings. XForms 1.1 says:

"All UI Expressions are reevaluated (implementations may optimize this
operation but must behave as if all UI Expressions are reevaluated)"

So there you go, you have a discrepancy between the two scenarios.

We could fix this bug simply by causing a rebuild, as that would be
against the spec. But that could also be costly at runtime as even
more XPath expressions would be computed.

I think it would be better to have an actual smart dependency
algorithm catching this kind of dependencies. Then things would run
much more smoothly.

In your case, you could force a rebuild with the xforms:rebuild action.

The bottom line is that, as per XForms 1.1, this is not a bug.
Arguably, it is an XForms specification bug though.

-Erik

On Sat, Jan 30, 2010 at 12:28 AM, Maciej Arciuch
<[hidden email]> wrote:

> Alessandro Vernet pisze
>>
>> We now have 3 issues we
>> want to take care of before we do the release, and none of them is
>> rocket science.
>
> Hi,
> I know that there might be many more important issues, but would be possible
> that you take care of this one:
> http://forge.ow2.org/tracker/index.php?func=detail&aid=314456&group_id=168&atid=350207
> ? Although the example I provided looks a bit silly, the improper bind
> recalculation make many correct form runs incorrectly in Orbeon. Best
> regards,
> --
> Maciej Arciuch
> programista
> tel. +48 22 564 2482
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws