You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Howard M. Lewis Ship" <hl...@attbi.com> on 2003/02/23 16:05:02 UTC

RE: [Tapestry-developer] Can't understand what is form rewinding.

Define "ad-hoc".  Tapestry components work in completely well-defined,
predictable ways.  Ordinary web applications are "ad-hoc", meaning, full of
untested, custom code.

Yes, it does take a little bit to bend your brain around how a swarm of
small objects (the components) can each do a little bit of work, and end up
with the same result as a monolithic code block in a custom-coded servlet.
It's the same old story though ... a higher level approach (Java instead of
C instead of assembly instead of throwing switches on the front panel) just
takes a little getting used to.

The Tapestry Epiphany occurs when you suddenly realize how much, and how
little, Tapestry really does.  It's the moment when you realize that
Tapestry isn't magic, that it is simply a tool that can be understood and
used, and that you, the developer, are still in charge.  Hang in there!

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: tapestry-developer-admin@lists.sourceforge.net 
> [mailto:tapestry-developer-admin@lists.sourceforge.net] On 
> Behalf Of Tarun Ramakrishna Elankath
> Sent: Saturday, February 22, 2003 3:47 PM
> To: tapestry-developer@lists.sourceforge.net
> Subject: Re: [Tapestry-developer] Can't understand what is 
> form rewinding.
> 
> 
> 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 
> > Tapestry-developer@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/tapestry-developer
> > 
> 
> 
> 
> -------------------------------------------------------
> 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 
> Tapestry-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tapestry-developer
>