W3C home > Mailing lists > Public > public-xformsusers@w3.org > July 2012

Re: recursive dispatch of actions

From: Erik Bruchez <erik@bruchez.org>
Date: Mon, 30 Jul 2012 21:34:37 -0700
Message-ID: <CAAc0PEXsHuK2pG=E+68ziT=3K9ZgZJqQZdK73UL21MQ9itsjmg@mail.gmail.com>
To: public-xformsusers@w3.org
Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>
I have never been able to see a real use case for the xforms–refresh
event. In fact, the idea that only the controls associated with a
specific model should be updated is a little bit funny. It really
makes sense only if you don't nest model references in the UI.

I think I remember that we discussed in a call that initially the
multiple-model support was intended for separate pieces of UI, as in a
portal. But at this point in the specification multiple models have
become this more complicated thing where you can nest reference to
various models in the UI.

In our implementation, we have decided to make the refresh operation a
global operation. Meaning that if you dispatch xforms-refresh it will
refresh the entire user interface, independently from the model. This
doesn't mean that optimizations are not performed. It just means that
you don't have the specific ability, as a form author, to refresh only
the controls that are associated with a particular model.

So the need for this event is also a little bit unclear, and this
might be one of those cases where we wish the spec was relaxed a
little bit to officially allow implementers more leeway. There are
other examples of this, including xforms-value-changed,
xforms-recalculate, and xforms-revalidate.

-Erik

On Mon, Jul 30, 2012 at 8:00 PM, C. M. Sperberg-McQueen
<cmsmcq@blackmesatech.com> wrote:
> This may remind some of a popular quotation from Samuel Johnson:
>
>   [it] is like a dog's walking on his hind legs. It is not done well; but you
>   are surprised to find it done at all.
>
> But in case it is of any interest to other users of XForms, I have built
> a simple demonstration page illustrating the implementation of
> recursive functions in XForms by the use of action, dispatch, insert,
> delete, and a document instance reserved for use as a stack:
>
>   http://blackmesatech.com/2012/07/testcase/actions.xml
>
> It may perhaps be regarded as a simple demonstration of the
> fact enunciated in section 1.5.6 of the XForms 1.1 spec:
>
>> All XForms actions, as well as sets of actions, can be executed conditionally or iteratively. Combined with the generalized insert and delete, this means that the information processing power of XForms 1.1 is Turing-complete.
>
>
> In preparing the example, I learned a great deal.  Unfortunately, one
> of the things I learned is that I don't understand how the xforms-refresh
> event is intended to be propagated, or how to use it (if one can) to
> make a representation of the stack change as the recursive calls
> proceed.
>
> Can any reader of this list point me to a useful example of xf:refresh
> or of xf:dispatch name="xforms-refresh"?
>
> --
> ****************************************************************
> * C. M. Sperberg-McQueen, Black Mesa Technologies LLC
> * http://www.blackmesatech.com
> * http://cmsmcq.com/mib
> * http://balisage.net
> ****************************************************************
>
>
>
>
>
Received on Tuesday, 31 July 2012 04:35:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:48:24 UTC