|
From: Alef A. <al...@jt...> - 2004-08-19 15:03:10
|
Yup no problem. I'll do this later today. Alef =20 > -----Original Message----- > From: spr...@li...=20 > [mailto:spr...@li...] > On Behalf Of jez humble > Sent: Thursday, August 19, 2004 3:01 PM > To: spr...@li... > Subject: [Springframework-developer] Documentation for=20 > AbstractWizardFormController >=20 > Hi there everyone. >=20 > First of all, great work on Spring. I've just started using=20 > it and it has made my life a lot easier. >=20 > Having spent a few hours writing a wizard, I have come up=20 > with some documentation for the AbstractWizardFormController=20 > (see below). Would you consider including this in your online=20 > reference manual, in section 12.3.4 (which currently lists=20 > WizardFormController instead of AbstractWizardFormController) ? >=20 > With all best wishes, >=20 > Jez Humble > Director, > Urban Guru Ltd > http://www.urbanguru.net/ >=20 >=20 > How to use Spring's AbstractWizardFormController >=20 > As the class name suggests, this is an abstract class - so=20 > your WizardController should extend it. This means in=20 > particular you have to implement the following abstract=20 > methods: validatePage, processFinish and processCancel. >=20 > You'll also want to write a constructor, which should at the=20 > very least call setPages and setCommandName. setPages takes=20 > as its argument an array of type String. This array is the=20 > list of views which comprise your wizard. setCommandName=20 > takes as its argument a string, which will be used to refer=20 > to your Command object from within your views. >=20 > As with any instance of AbstractFormController, you are=20 > required to use a Command object - a JavaBean which will be=20 > populated with the data from your forms. You can do this in=20 > one of two ways: either call setCommandClass from the=20 > constructor with the class of your command object, or=20 > implement the formBackingObject method. >=20 > AbstractWizardFormController has a number of concrete methods=20 > that you may wish to override. Of these, the ones you are=20 > likely to find most useful are: referenceData which you can=20 > use to pass model data to your view in the form of a Map;=20 > getTargetPage if your wizard needs to change page order or=20 > omit pages dynamically; and onBindAndValidate if you want to=20 > override the built-in binding and validation workflow. >=20 > Finally, it is worth pointing out the setAllowDirtyBack and=20 > setAllowDirtyForward, which you can call from getTargetPage=20 > to allow users to move backwards and forwards in the wizard=20 > even if validation fails for the current page. >=20 > For a full list of methods, see the JavaDoc for=20 > AbstractWizardFormController. There is an implemented example=20 > of this wizard in the jPetStore included in the Spring=20 > distribution:=20 > org.springframework.samples.jpetstore.web.spring.OrderFormCont > roller.java >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on=20 > Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic=20 > DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free=20 > Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 >=20 >=20 >=20 |