- From: Chaudhuri, Hiran (Software AG) <g.s31d05b@lfstad.bayern.de>
- Date: Thu, 6 Jun 2002 12:47:58 +0200
- To: "'Micah Dubinko'" <MDubinko@cardiff.com>, "Www-Forms (E-Mail)" <www-forms@w3.org>
Hi, Micah. This solution works only for yes/no questions, and you would not even need nested switches: +--------------------------------------------------+ | You may choose the simple (automatic) procedure, | | or the verbose if you know what you're doing. | | | | What do you want to do? | | | | [simple] | | [verbose] | | | +--------------------------------------------------+ But what if you need to decide on other things? Like, say a numerical field value exceeds 1000, and therefore you need additional information? In my eyes it should be possible to declare such rules, and the XForms processor might then execute them and come to a decision. Also, how do I add validation on the button that toggles the switch to the next page? Hiran > -----Ursprüngliche Nachricht----- > Von: Micah Dubinko [mailto:MDubinko@cardiff.com] > Gesendet: Donnerstag, 6. Juni 2002 12:26 > An: 'Chaudhuri, Hiran (Software AG)'; Www-Forms (E-Mail) > Betreff: RE: Wizards in XForms > > > One way to analyze this case is: > > You really have two different 'next' buttons. This could be a nested > <switch>, with each button in a <case>. Depending on the > state of the radio > buttons, you decide which case (and which 'next' button) is > visible and > available. Thanks! > > .micah > > -----Original Message----- > From: Chaudhuri, Hiran (Software AG) > [mailto:g.s31d05b@lfstad.bayern.de] > Sent: Tuesday, June 04, 2002 1:05 AM > To: Www-Forms (E-Mail) > Subject: AW: Wizards in XForms > > > > Hi there. > > Although I managed to build a wizard with the solution > suggested by Micah, > there is a case I cannot cover: > > It was no problem to create a switch statement containing several case > statements, one for each wizard page. Also the buttons I > inserted could > switch from page to page. What I wrote looks a bit like this: > > <xforms:switch xforms:initial="screen1"> > <xforms:case xforms:id="screen1"> > > <!-- Here goes XForm code for the first page --> > > <xforms:button> > <xforms:caption>Next</xforms:caption> > <xforms:action> > <xforms:toggle xforms:case="screen2"/> > </xforms:action> > </xforms:button> > </xforms:case> > <xforms:case xforms:id="screen2"> > > <!-- Here goes XForm code for the second page --> > > <xforms:button> > <xforms:caption>Previous</xforms:caption> > <xforms:action> > <xforms:toggle xforms:case="screen1"/> > </xforms:action> > </xforms:button> > <xforms:button> > <xforms:caption>Finish</xforms:caption> > <xforms:action> > <xforms:submitInstance xforms:submitInfo=".."/> > </xforms:action> > </xforms:button> > </xforms:case> > </xforms:switch> > > What I cannot cover with this is jumping over pages if some > conditions are > met. Imagine a wizard displaying this page: > > +--------------------------------------------------+ > | You may choose the simple (automatic) procedure, | > | or the verbose if you know what you're doing. | > | | > | What do you want to do? | > | | > | (o) simple | > | ( ) verbose | > | | > | [Previous] [Next] | > | | > +--------------------------------------------------+ > > Here I'd like to skip the verbose pages and continue with > default values > (which are already entered in the model). The question is: > How does XForms > specify a switch to the according page depending on instance > data (or field > state, respectively)? > > Hiran > > -----Ursprüngliche Nachricht----- > Von: Chaudhuri, Hiran (Software AG) > Gesendet: Montag, 3. Juni 2002 14:42 > An: 'Micah Dubinko' > Betreff: AW: Wizards in XForms > > > Hi, Micah. > > The approach with one form containing a switch for all the > wizard pages and > buttons to navigate back and forth did work with Chiba > 0.6.2.1, and it was > not even too much work. > > Thank you. > > Hiran > > -----Ursprüngliche Nachricht----- > Von: Micah Dubinko [mailto:MDubinko@cardiff.com] > Gesendet: Montag, 3. Juni 2002 11:45 > An: 'Chaudhuri, Hiran (Software AG)' > Cc: 'www-forms@w3.org' > Betreff: RE: Wizards in XForms > > > A "wizard" is just a special rendering of a multiple-page form, right? > > To do that, you can use the <switch> construct, with each > panel inside a > <case>. Separately, you can use <button>s that fire <toggle> events to > change which panel is presented. > > Try this out and let us know how it works. > > Thanks, > > .micah > > -----Original Message----- > From: Chaudhuri, Hiran (Software AG) > [mailto:g.s31d05b@lfstad.bayern.de] > Sent: Monday, June 03, 2002 1:54 AM > To: 'www-forms@w3.org' > Subject: Wizards in XForms > > > > Hi there. > > As I need to create some forms that need flexible use, I had a look at > XForms and am missing one feature (at least, it's not mentioned in the > XForms WD): Wizards. > > I have searched the mailing list archives for that topic, only to find > others have asked about it, but there has not been a > definitive answer. > > So how are you supposed to build a Wizard? Shall all wizard > pages reside in > one XForm document? Then how do you mark it as being a > wizard? Which is the > start page, and how do you switch to subsequent pages? How do > you ensure all > the pages operate with the same instance data? > > Hiran >
Received on Thursday, 6 June 2002 06:47:45 UTC