W3C home > Mailing lists > Public > www-forms@w3.org > October 2006

RE: Reset and insert actions

From: Rafael Benito <rbenito@satec.es>
Date: Wed, 25 Oct 2006 10:26:46 +0200
To: "'John Boyer'" <boyerj@ca.ibm.com>
Cc: <www-forms@w3.org>, <www-forms-request@w3.org>
Message-ID: <006001c6f80f$4f422290$eb21a4d5@int.satec.es>
Hi John,
I agree that it can be done with insert. In fact, the sample included in 1.1
for the delete action illustrates your point for the last node deletion
My point here is twofold:
    - from the author's point of view, it would be easier if the processor
takes care of some complexities. This is specially true if we had <reset
model='yourmodel' instance='yourinstance'/>. This is far easier than having
to make a copy of the initial state to insert it back from time to time.
    - the author's based solution consumes more resources than processor
based solutions that could be implemented. We are specially sensible to this
kind of issues.


De: www-forms-request@w3.org [mailto:www-forms-request@w3.org] En nombre de
John Boyer
Enviado el: miércoles, 25 de octubre de 2006 3:09
Para: Rafael Benito
CC: www-forms@w3.org; www-forms-request@w3.org
Asunto: Re: Reset and insert actions

Hi Rafael, 

>From what I can tell here, everything you described can be done with
straightforward invocations of the insert action in XForms 1.1. 

You could copy the starting state of an homogeneous collection to some
location on model construct done, or you could have a multi-row start state
already in an instance that you copy into your main data when the user
activates a trigger. 

John M. Boyer, Ph.D.
STSM: Workplace Forms Architect and Researcher
Co-Chair, W3C Forms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com  http://www.ibm.com/software/

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer

"Rafael Benito" <rbenito@satec.es> 
Sent by: www-forms-request@w3.org 

10/24/2006 05:31 AM 



Reset and insert actions


Hi all, 

the reset action accepts a single attribute for the model to reset. It would
be useful for authors to add a second optional attribute @instance to reset
a single instance rather than the whole model. The same effect could be
accomplished using a sequence of setvalue, insert and delete actions; but
anyway it would be simpler to add @instance. In data entry applications it
is a common case to enter some general info and, then, run through a loop
entering data, sending them and then starting again the loop but keeping the
general info introduced at the begining of the form execution. For this kind
of applications, it would be useful, as you can store general info in ino
instance and the rest of the data in a different one which is reset for
every iteration. 

In any case, the reset implemetation requires that the processor "remembers"
the initial state of the model. This fact draws me to some other thoughts:
in Xforms 1.0 there was a problem with the insert action when the last node
of an homogenous collection is deleted. This was solved in 1.1 through the
use of conditional actions and changes to the insert action. Nevertheless,
it would be simpler for authors to let the processor  "remember" the
"structure" of the homogenous collection (rather than the initial state,
because it could contain several rows and that is not what we want) and let
the insert action work correctly, even if nodeset is empty but this was not
the case for the initial data. In case the author wants to insert nodes with
a different structure, he can still do it using the @origin attribute of the


Rafael Benito Ruíz de Villa
Director Area e-business
Móvil (+34) 617 314 293
 <mailto:rbenito@satec.es> rbenito@satec.es 

MADRID <http://www.satec.es/>  

Avda. Europa, 34 A
28023 Aravaca
Telf.: (+34) 91 708 90 00 / 91 211 03 00
Fax: (+34) 91 708 90 90 / 91 211 03 90 

(image/gif attachment: ATT00055.gif)

(image/gif attachment: ATT00058.gif)

Received on Wednesday, 25 October 2006 08:27:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:18 UTC