Thanks Martijn, You read my mind. :-) I didn't see a link to it on the main Wiki page. How are people going to find it?
>>> [EMAIL PROTECTED] 2005-04-19 2:43:47 AM >>> I have put this on the wiki (http://wicket.sourceforge.net/wiki/doku.php?id=user:building_wizard_functionality), as this is a recurring question... Martijn Eelco Hillenius wrote: > There are generally two ways of doing this (I think): > 1. Page oriented. Create a page for each step, and record your status > by either passing it to the step pages as you construct them. > 2. Panel oriented, using: > a. 'replace'. This way you have one panel (e.g. 'mywizPanel'), > where your step part of the wizzard is in. On a next step, replace the > current panel with the next one. The advantage of this is that it is > flexible (doesn't matter how many steps you have, you can allways > replace the panel with an arbitrairy other one. You let Wicket handle > back-button support (Wicket will record undo's using a memento like > pattern). > b. 'set/isVisible'. Here you create all instances of the panels you > need beforehand, and put them all on the page (or wizzard panel), > using different names (e.g. 'myWizStep1' and 'myWizStep2'). The trick > here is the set only the one visible that is currently active (thus > all others are not rendered). The advantage of this is that you only > create the instances once, and that you don't have to record changes > for backbutton support. However, it consumes more memory upfront, and > you have to know your panel steps beforehand. > > With 2, I would record the wizzard state with the parent (page or > another panel). > > Another thing that might be a good idea, is to use command patterns > for navigation actions. For example, I use this for a project: > > public interface INavigationAction > { > void navigate(RequestCycle requestCycle); > } > > /** action to navigate back to this page. */ > private final INavigationAction backToThisPageNavigationAction = > new INavigationAction() > { > public void navigate(RequestCycle requestCycle) > { > requestCycle.setResponsePage(VenueListPage.this); > } > }; > > and then have something like: > > public VenueDetailsPage(Long venueId, INavigationAction > backNavigationAction) > { > ... > add(new Link("cancelButton") > { > public void onClick() > { > backNavigationAction.navigate(getRequestCycle()); > } > }); > .... > > Anyway, that's just an idea. You might come up with a more elegant > pattern, or you might be happy with a tight coupling between the > wizzard steps. > > Regards, > > Eelco > > > Matthew Watson wrote: > >> Hi, >> >> I need to create a complicated wizard composed of numerous screens and >> buttons to navigate arround them. >> >> Using wicket whats the best approach to take? I know this is a fairly >> general question but I'm not entire sure where to start. >> >> Thanks in advance, >> Matt >> >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: New Crystal Reports XI. > Version 11 adds new functionality designed to reduce time involved in > creating, integrating, and deploying reporting solutions. Free runtime > info, > new features, or free trial, at: http://www.businessobjects.com/devxi/728 > _______________________________________________ > Wicket-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-user ------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. www.katun.com ********************************************************************** ------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
