W3C home > Mailing lists > Public > www-forms@w3.org > July 2002

RE: wizards

From: Plechsmíd Martin <Martin.Plechsmid@merlin.cz>
Date: Fri, 26 Jul 2002 10:18:17 +0200
Message-ID: <E50028F23FC6D3118B7D00609761083F01D41063@merkur.merlin.cz>
To: "'duke'" <mclay@aon.at>
Cc: "'XForms'" <www-forms@w3.org>

Hi.

I didn't write any wizard in XForms yet. But I would make it somehow like
this:

1. If I had to stick to the last XForms WD but didn't want to compromise the
submitted xml with the limitations of XForms:
 - One instance would contain all results of the wizard, and would be
submitted when the wizard ends its work.
 - Another -auxiliary - instance would contain a xml branch for each wizard
page, and a value-holder for the current page number.
 - Data would be copied from the first instance to the auxiliary instance
upon initializeDone, and collected back to the main instance upon form
submit.
 - Each branch would have a <bind> with @relevant true if the current page
number is equal to the branch number.
 - In the UI I would have a <group> for each wizard page with @ref pointing
to the corresponding branch in the auxiliary model.
 - Next / Back buttons would simply increase / decrease the current page
number via <setValue>.

2. Another possibility is to use <toggle> and <switch>:
 - Instead of having a xml branch and a <group> for each page, you could
have a <case> for each page.
 - Next / Back buttons would then toggle on the next / previous <case>.
An advantage of this solution is that you needn't copy data from one
instance to another, an disadvantage is that this solution is less flexible
(you cannot decide dynamically to which page you will skip).

3. If I had more freedom in what form language to choose and if I wanted to
stick to the forms design principles I'm trying to propagate here in the
XForms mailing list, I would do that this way:
 - One instance would contain all results of the wizard, and would be
submitted when the wizard ends its work.
 - An auxiliary instance would hold the current page index.
 - For each action (Next / Back / Finish / Cancel) I would introduce a
<submitInfo> with @relevant. E.g.

	<submitInfo id="finish" ref="/Wizard"
relevant="model('aux')/root/currentPage =
model('aux')/root/lastPage">.....</submitInfo>

(The "model('aux')" refers to the second model that contains the auxiliary
instance.) The reason for having @relevant on <submitInfo> is that I want
the model layer to be self-consistent and not to allow actions that are
meaningless at the moment (independently on UI).
 - Having finished the model layer, I would build a UI layer upon it. Each
wizard page would have its own <group>, but now all the groups would be
using common xml data (not separated xml branches).
 - I don't want to display all the wizard pages at once, so now I would put
@relevant on each <group>, e.g.:

	<group id="page5" ref="/Wizard"
relevant="model('aux')/root/currentPage = 5">.....</group>

Again, I place @relevant on <group> because I don't want to mix layers. At
the time I am designing the UI, the model layer is already finished and
closed for modifications.
 - When I finish the UI functionality layer, I could reposition, colour,
simply beautify the resulting form using CSS or another more powerfull
language.

Remark: In my description I completely omitted the data layer, which is at
the very bottom.

I hope this will help you somehow.
Best regards,
		Martin.


> -----Pùvodní zpráva-----
> Od: duke [mailto:mclay@aon.at]
> Odesláno: 26. èervence 2002 8:48
> Komu: 'Plechsmíd Martin'
> Pøedmìt: RE: XForms Schema Attached
> 
> 
> 
> 
> Hi!
> 
> Sorry to send an email direct on your adress but i ask me how do you
> solved this problem.
> 
> do you know the discussion about "Wizards in XForms" from 
> last month???
> Have you ever had a similar problem? And if yes how do you solved it
> with xforms?
> 
> Best regards
> 
> Michael clay
Received on Friday, 26 July 2002 04:29:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:51 GMT