You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Harish Krishnaswamy <hk...@comcast.net> on 2003/06/13 21:32:00 UTC

Page class re-utilization?

Hi,

Is there a way of re-utilizing a class in 2 consecutive pages without 
having to re-initialize the class?

For ex.
I have 2 pages Registration and Verification. They both share a class. 
Now after the registration data is captured on the Registration page, I 
have to forward it to the Verification page but I have to repopulate the 
class with the data it already has for it to show on the Verification 
page. I understand why, but is there a way around this?

Thanks
Harish


Re: Page class re-utilization?

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Pardon me if I sound rude, but I really knew about this! I was hoping 
for a way to specify to the framework as to which page class to attach 
to the engine, rather than the engine picking one from the pool. Is there?

Thanks
Harish

Bill Lear wrote:

>On Friday, June 13, 2003 at 15:32:00 (-0400) Harish Krishnaswamy writes:
>  
>
>>Hi,
>>
>>Is there a way of re-utilizing a class in 2 consecutive pages without 
>>having to re-initialize the class?
>>
>>For ex.
>>I have 2 pages Registration and Verification. They both share a class. 
>>Now after the registration data is captured on the Registration page, I 
>>have to forward it to the Verification page but I have to repopulate the 
>>class with the data it already has for it to show on the Verification 
>>page. I understand why, but is there a way around this?
>>    
>>
>
>I encapsulate all such state in an AuthorizationRequest object that I
>store in the Visit in the Registration page.  The Verification page
>retrieves it from there and when verification is accomplished, it
>clears the AuthorizationRequest object.
>
>
>Bill
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>


Re: Page class re-utilization?

Posted by Bill Lear <ra...@zopyra.com>.
On Friday, June 13, 2003 at 15:32:00 (-0400) Harish Krishnaswamy writes:
>Hi,
>
>Is there a way of re-utilizing a class in 2 consecutive pages without 
>having to re-initialize the class?
>
>For ex.
>I have 2 pages Registration and Verification. They both share a class. 
>Now after the registration data is captured on the Registration page, I 
>have to forward it to the Verification page but I have to repopulate the 
>class with the data it already has for it to show on the Verification 
>page. I understand why, but is there a way around this?

I encapsulate all such state in an AuthorizationRequest object that I
store in the Visit in the Registration page.  The Verification page
retrieves it from there and when verification is accomplished, it
clears the AuthorizationRequest object.


Bill