Re: [Tapestry-developer] Can't understand what is form rewinding.
Brought to you by:
hship
From: Tarun R. E. <ta...@we...> - 2003-02-22 20:26:47
|
Yes Eric, your explanation did help a bit. Thank you! I have understood what it does, but it still looks a bit like black magic to me. Isn't such a scheme be ad-hoc ? What I understand of rewinding with the illustration that you have given, is that it's basically an operation that enables components to carry out actions using the previous request state, instead of the current one. Am I correct here ? I guess I'll need to experiment with a concrete program example in order to completely get the hang of it. Thanks a ton, Tarun On Fri, 2003-02-21 at 22:48, Eric Everman wrote: > Tarun- > > I can take a stab at that question. > > Form rewinding is the process of recreating the same conditions during form > submit, that a particular component saw during form render. > > For rewinding is key in understanding iterative form components. For > instance, say you have an arbitrary list of items with 'edit' and 'delete' > buttons next to each item. Your template might look something like this > (in pseudo code) > > <for each item> > <insert item name/><create edit button/><create delete button/> > </for each item> > > All the delete buttons call the delete() method, but do not specify which > item to delete. When the user clicks a 'Delete' button, the conditions > that the form saw when the button were rendered are recreated - that is, if > your page had a currentItem property, that property is reset to the > currentItem when the button was rendered. Your delete method is called by > Tapestry and your code deletes the item in currentItem, know that it is the > correct item. > > This is all optional and not ideal in some cases. You can use the Direct > service, which puts the burden on you to give actions a meaningful > identifier by which you can locate the correct item to act on. > > Does that help? > > Eric Everman > > At 2/21/2003, Elankath, Tarun (Cognizant) wrote: > >Hi list, > > > >Sorry for this newbie-style question. I have read the tutorial and the user > >manual. I understand the advantages that Tapestry offers, but its complexity > >is mind-boggling. I have been just totally unable to understand what is form > >rewinding/rewind cycle and its principle. > > > >Could someone please explain what rewind is ? > > > >All help/pointers gratefully appreciated, > >Tarun > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. > The most comprehensive and flexible code editor you can use. > Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. > www.slickedit.com/sourceforge > _______________________________________________ > Tapestry-developer mailing list > Tap...@li... > https://lists.sourceforge.net/lists/listinfo/tapestry-developer > |