You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by James Hays <ja...@mac.com> on 2003/08/26 19:25:22 UTC
Rewind Usage
Does anyone have an example of using Tapestry's rewind feature on a
component or a page?
The problem I'm trying to solve is with a cancel button. I am currently
setting a submit component with a listener that goes to a predetermined
page. The components on this page link to the visit object directly, so
when the form submits, my visit object is modified. If I choose to
cancel this form, I need a way to 'rewind' the form and get my old
values back? I'm assuming this is the purpose of the rewind feature,
but I'm not 100% sure as I've found little documentation or conversation
about it in this list.
If you have any thoughts on this problem please let me know or if you
could point me in the right direction, it would be most appreciated.
Thanks,
James Hays
Re: Rewind Usage
Posted by James Hays <ja...@mac.com>.
Sure. :) Thanks for the information. But I still think there needs to
be a way to by-pass the setters when submitting a form. Maybe a
seperate component called Cancel which can specify a listener, but skips
setting values.
Harish Krishnaswamy wrote:
> Rewind in Tapestry is the process of reversing the render. When a page
> is rendered, form values are updated from the properties bound to the
> components and when the page is submitted (rewound) the form values
> are updated back to the properties bound to the components (the exact
> reverse process of the render).
>
> -Harish
>
> PS. Did I steal Howard's chance? ;)
>
> James Hays wrote:
>
>> Yes, your suggestion makes perfect sense. I was planning on doing it
>> that way to hide the visit if I couldn't find a better way to do it.
>>
>> Rewind to me means to back up or reverse the process. So, I had
>> assumed that it meant that it would revert my form objects back to
>> their state before the form was submited.
>> Howard, can you clarify this? Is it possible to call a listener on a
>> form without the setters being called first?
>>
>> James
>>
>> Harish Krishnaswamy wrote:
>>
>>> I am afraid that's not the purpose of rewind. The rewind, as I
>>> understand it, is basically a mechanism of grabbing the data in the
>>> form and setting it in the objects bound to the form components. The
>>> way I would handle your situation is, set a property when "cancel"
>>> is pressed and use this property to determine when to update the
>>> Visit. This may need some synthetic properties in your page as a
>>> temporary storage for your form values. Let me know if this not
>>> clear enough.
>>>
>>> -Harish
>>>
>>> James Hays wrote:
>>>
>>>> Does anyone have an example of using Tapestry's rewind feature on a
>>>> component or a page?
>>>>
>>>> The problem I'm trying to solve is with a cancel button. I am
>>>> currently setting a submit component with a listener that goes to a
>>>> predetermined page. The components on this page link to the visit
>>>> object directly, so when the form submits, my visit object is
>>>> modified. If I choose to cancel this form, I need a way to
>>>> 'rewind' the form and get my old values back? I'm assuming this is
>>>> the purpose of the rewind feature, but I'm not 100% sure as I've
>>>> found little documentation or conversation about it in this list.
>>>>
>>>> If you have any thoughts on this problem please let me know or if
>>>> you could point me in the right direction, it would be most
>>>> appreciated.
>>>>
>>>> Thanks,
>>>>
>>>> James Hays
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: Rewind Usage
Posted by Harish Krishnaswamy <hk...@comcast.net>.
Rewind in Tapestry is the process of reversing the render. When a page
is rendered, form values are updated from the properties bound to the
components and when the page is submitted (rewound) the form values are
updated back to the properties bound to the components (the exact
reverse process of the render).
-Harish
PS. Did I steal Howard's chance? ;)
James Hays wrote:
> Yes, your suggestion makes perfect sense. I was planning on doing it
> that way to hide the visit if I couldn't find a better way to do it.
>
> Rewind to me means to back up or reverse the process. So, I had
> assumed that it meant that it would revert my form objects back to
> their state before the form was submited.
> Howard, can you clarify this? Is it possible to call a listener on a
> form without the setters being called first?
>
> James
>
> Harish Krishnaswamy wrote:
>
>> I am afraid that's not the purpose of rewind. The rewind, as I
>> understand it, is basically a mechanism of grabbing the data in the
>> form and setting it in the objects bound to the form components. The
>> way I would handle your situation is, set a property when "cancel" is
>> pressed and use this property to determine when to update the Visit.
>> This may need some synthetic properties in your page as a temporary
>> storage for your form values. Let me know if this not clear enough.
>>
>> -Harish
>>
>> James Hays wrote:
>>
>>> Does anyone have an example of using Tapestry's rewind feature on a
>>> component or a page?
>>>
>>> The problem I'm trying to solve is with a cancel button. I am
>>> currently setting a submit component with a listener that goes to a
>>> predetermined page. The components on this page link to the visit
>>> object directly, so when the form submits, my visit object is
>>> modified. If I choose to cancel this form, I need a way to 'rewind'
>>> the form and get my old values back? I'm assuming this is the
>>> purpose of the rewind feature, but I'm not 100% sure as I've found
>>> little documentation or conversation about it in this list.
>>>
>>> If you have any thoughts on this problem please let me know or if
>>> you could point me in the right direction, it would be most
>>> appreciated.
>>>
>>> Thanks,
>>>
>>> James Hays
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
Re: Rewind Usage
Posted by James Hays <ja...@mac.com>.
Yes, your suggestion makes perfect sense. I was planning on doing it
that way to hide the visit if I couldn't find a better way to do it.
Rewind to me means to back up or reverse the process. So, I had assumed
that it meant that it would revert my form objects back to their state
before the form was submited.
Howard, can you clarify this? Is it possible to call a listener on a
form without the setters being called first?
James
Harish Krishnaswamy wrote:
> I am afraid that's not the purpose of rewind. The rewind, as I
> understand it, is basically a mechanism of grabbing the data in the
> form and setting it in the objects bound to the form components. The
> way I would handle your situation is, set a property when "cancel" is
> pressed and use this property to determine when to update the Visit.
> This may need some synthetic properties in your page as a temporary
> storage for your form values. Let me know if this not clear enough.
>
> -Harish
>
> James Hays wrote:
>
>> Does anyone have an example of using Tapestry's rewind feature on a
>> component or a page?
>>
>> The problem I'm trying to solve is with a cancel button. I am
>> currently setting a submit component with a listener that goes to a
>> predetermined page. The components on this page link to the visit
>> object directly, so when the form submits, my visit object is
>> modified. If I choose to cancel this form, I need a way to 'rewind'
>> the form and get my old values back? I'm assuming this is the
>> purpose of the rewind feature, but I'm not 100% sure as I've found
>> little documentation or conversation about it in this list.
>>
>> If you have any thoughts on this problem please let me know or if you
>> could point me in the right direction, it would be most appreciated.
>>
>> Thanks,
>>
>> James Hays
>>
>>
>> ---------------------------------------------------------------------
>> 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: Rewind Usage
Posted by Harish Krishnaswamy <hk...@comcast.net>.
Harish Krishnaswamy wrote:
> I am afraid that's not the purpose of rewind. The rewind, as I
> understand it, is basically a mechanism of grabbing the data in the
> form and setting it in the objects bound to the form components. The
> way I would handle your situation is, set a property when "cancel" is
> pressed and use this property to determine when to update the Visit.
> This may need some synthetic properties in your page as a temporary
> storage for your form values. Let me know if this not clear enough.
>
> -Harish
>
> James Hays wrote:
>
>> Does anyone have an example of using Tapestry's rewind feature on a
>> component or a page?
>>
>> The problem I'm trying to solve is with a cancel button. I am
>> currently setting a submit component with a listener that goes to a
>> predetermined page. The components on this page link to the visit
>> object directly, so when the form submits, my visit object is
>> modified. If I choose to cancel this form, I need a way to 'rewind'
>> the form and get my old values back? I'm assuming this is the
>> purpose of the rewind feature, but I'm not 100% sure as I've found
>> little documentation or conversation about it in this list.
>>
>> If you have any thoughts on this problem please let me know or if you
>> could point me in the right direction, it would be most appreciated.
>>
>> Thanks,
>>
>> James Hays
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
Re: Rewind Usage
Posted by Harish Krishnaswamy <hk...@comcast.net>.
I am afraid that's not the purpose of rewind. The rewind, as I
understand it, is basically a mechanism of grabbing the data in the form
and setting it in the objects bound to the form components. The way I
would handle your situation is, set a property when "cancel" is pressed
and use this property to determine when to update the Visit. This may
need some synthetic properties in your page as a temporary storage for
your form values. Let me know if this not clear enough.
-Harish
James Hays wrote:
> Does anyone have an example of using Tapestry's rewind feature on a
> component or a page?
>
> The problem I'm trying to solve is with a cancel button. I am
> currently setting a submit component with a listener that goes to a
> predetermined page. The components on this page link to the visit
> object directly, so when the form submits, my visit object is
> modified. If I choose to cancel this form, I need a way to 'rewind'
> the form and get my old values back? I'm assuming this is the purpose
> of the rewind feature, but I'm not 100% sure as I've found little
> documentation or conversation about it in this list.
>
> If you have any thoughts on this problem please let me know or if you
> could point me in the right direction, it would be most appreciated.
>
> Thanks,
>
> James Hays
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>