2010/1/21 Stephan Windmüller <stephan.windmuel...@cs.tu-dortmund.de>: > Am 21.01.2010 09:04, Hilco Wijbenga wrote: > >> So how would you suggest I store data that I only need in a component? > > That depends on what you want to do with the data and where you need it.
The component would consist of a dynamic set of radiogroups and checkboxes. While the user just sets up his choices I wanted to let the component take care of remembering those choices (as this is all temporary and the page doesn't need to know about it). Once completely done a separate submit would yield an object (for the page) based on those choices and the component would be done. >> I'm already using the activation context (not for this component) but >> the component has a fair number of fields and this is only the first >> component. I'm afraid I would be overloading the activation context. >> (It's not a lot of data, just a lot of fields.) > > Perhaps you could describe what sort of component this is, what the users > does with it and what you do with the data. See above. >> I'm not using a database so all data needs to be in either the >> session, the URL, or in (the server's) memory (other than the >> session). > > So you want to store all the data which the user generates in his session? :-) I guess there's not really another option. I may be making things too complicated. >> What would be the most economical and scalable way to store >> >> up to a few hundred small fields (tiny integers and single characters >> only)? I could probably work out a way to compress it all into a >> single string which I could store in the activation context. > > On one page I use an approach like this. I want the user to be able to undo > the settings until he leaves the page, so I store all previous steps in a > Java List, convert it to compressed XML and store it in a hidden field. This > is rather ugly but the only way I could think of. Yes, exactly. Cheers, Hilco --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org