You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Auradkar, Rajendra V." <RV...@stthomas.edu> on 2004/02/05 23:12:00 UTC

RE: [SPAM] Re: Cancelling ForEach rewind

Fermin,
It IS a normal form rewind, there is not ForEach, sorry.  Are you saying
that I use java script for resetting the values back?  Is there some way to
do it on the server side, like stopping the rewind in the form submit?  I
guess I am a little confused on the order in which the events occur.
Thanks,
Raj auradkar

  _____  

From: F. Da Costa [mailto:dacosta@xs4all.nl]
Sent: Thu 2/5/2004 3:34 PM
To: tapestry-user@jakarta.apache.org
Subject: [SPAM] Re: Cancelling ForEach rewind



Auradkar, Rajendra V. wrote: 
> I am having a page which displays data from a record in a form.  The data
is 
> editable.  The user could change some fields and then change their mind
and 
> press on a button 'Cancel'.  At this point the changes made by the user
need 
> to be cancelled.  How can one prevent the changed data from updating the 
> bound values to the data model when the form is submitted? 
If you submit you submit deliberately so y'd have to store the old data 
somewhere. 
Now, if y'r talking about the user doing a lot of stuff on the client and 
*then* deciding that he wants to go back to the beginning *prior* to 
submitting you can use the *document.FormXYZ.reset()* function. 

That will restore the form to its starting state (since the last page load).


So, i'm not even sure y'r dealing with a Foreach rewind since you reside on 
the client until you submit (at which time an entirely different situation 
occurs). 

Cheers 
Fermin DCG 

> Thanks in advance, 
> Raj Auradkar 
> 
> 
> 
> ------------------------------------------------------------------------ 
> 
> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org 
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org 


--------------------------------------------------------------------- 
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org 
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org 



Re: [SPAM] Re: Cancelling ForEach rewind

Posted by "F. Da Costa" <da...@xs4all.nl>.
Auradkar, Rajendra V. wrote:

> Fermin,
> It IS a normal form rewind, there is not ForEach, sorry.  Are you saying
> that I use java script for resetting the values back?
It really depends on what y'r really looking for.

Is there some way to
> do it on the server side, like stopping the rewind in the form submit?
I can't see that happening because once you do a submit the form is send 
back to the server with all its fields set to their appropriate values (as 
per what the user 'did').

On the server it just goes through the whole list and does what it is 
supposed to do. *After* this it hands back control (so to speak) to the 
client again.
Now what you seem to be suggesting (to me that is) is that you want to 
interrupt this process because the user had a change of hart?
I cannot imagine that this is really what you are after.

Better to make the user aware of his actions. Pointing out to him that a 
submit is a submit and that he should think about his actions before 
commiting them. Now, if he changes his mind (still on the client) he can 
reset and redo his stuff (also he can use ctl-z per individual field).

I you really want a restore functionality on the server you would have to 
create that on the server (unless one of the in-crowd stepps in and puts me 
straight on this).

I guess I am a little confused on the order in which the events occur.
Hope its a bit clearer now ;)

Fermin DCG


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org