-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi George,
using some sort of conversation (i.e. HTTP session) state is one way to go - you would either detach the entities or use some sort of specialized Transfer Objects. Another way to go is to put the wizard into a single Tapestry page and use Ajax to switch between the different 'pages' of the wizard. For very complex pages, the effort may be prohibitive, but you can remain free of session state this way. You can store state of 'previous' steps of the wizard in hidden fields, or you can just 'hide' currently unused steps using CSS. Validation (both client and server side) can be tricky though because you do *not* want to validate data for steps that have not even been reached yet. Using @Persist, i.e. storing stuff in the HTTP session, gets your code up and working pretty fast. If your users open the same page in two browser tabs at the same time however you run into sticky issues. Removing data from the session in all situations when the user finishes, aborts or just leaves the wizard can also be tricky (there are other subtly problematic situations like concurrent requests). Avoiding session state takes more effort to develop initially because you need to address storage, lifetime etc. of temporary data explicitly. In my experience, it makes for more robust applications in the long run. There are situations for both approaches - take your pick ;-) Am 25.05.2012 16:25, schrieb Chris Cureau: > Hi George! > > What I am doing for this is following the Jumpstart example...I > store all of my entities in the Conversation, and on the last page > of the Wizard I write them to the database. It's worked out very > well so far. Check out > http://jumpstart.doublenegative.com.au/jumpstart/examples/wizard/usingpages1 > > for > the example I am using. > > There's also a page there for different techniques for passing data > between pages...check > http://jumpstart.doublenegative.com.au/jumpstart/examples/state/passingdatabetweenpages > > > > Another big thanks to Geoff for providing this valuable resource! > > On Fri, May 25, 2012 at 9:02 AM, George Christman > <gchrist...@cardaddy.com>wrote: > >> Hello, I'm building a small little wizard that consist of a few >> pages. The wizard allows for updates as well. I'm a hibernate >> user with a fairly complex data structure consisting of many >> joined entities. I do not want to save/update the data until the >> last page of the wizard which has caused me to lose my data from >> one page to the next. I thought there was a way to persist it >> with hibernate and retrieve it on the next page, but I've failed >> miserably with that. "Maybe I'm missing something". So my >> question is there a alternative solution such as SessionState or >> Persist where I could store the object in memory and then later >> save? >> >> -- View this message in context: >> http://tapestry.1045711.n5.nabble.com/Building-object-through-wizard-tp5713417.html >> >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+/m40ACgkQbmZsMyUPuXSSoQCg6X+LmZvf3K6AErSX9oeY7HvN 8mEAoNyouBjtXL0hz5FTrJteHWK7721P =r7A4 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org