You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by kpub <kp...@actcom.net.il> on 2003/09/08 03:33:28 UTC

Page redirect

Hi,

I implemented subclass of PageRedirectException that holds page object 
(for purpose of passing
parameters) and also I override the handlePageRedirectException method. 
it's seems ok.

My questions are
    1. Is this is the right way?
    2. the PageRedirectException has PageRedirectException(IPage) 
constructor, why not to store it
        and use it later on?

Anothe question out of context :
The StaleLink page specification define the page class as 
"org.apache.tapestry.pages.StaleLink"
StaleLink is abstract class how can it be?


Thanks
Yaniv.


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


Re: Page redirect

Posted by kpub <kp...@actcom.net.il>.
Marilen Corciovei wrote:

>I am using 2 methods for page redirection:
>
>- the PageRedirectException
>
>- the cycle.activate(pageName). 
>
>The later allows 2 methods of passing parameters:
>
>1. MyPage p = (MyPage)cycle.getPage("MyPage");
>    p.callMethods....
>    cycle.activate(p)
>
>2. Object params[] = ...
>    cycle.setServiceParameters(params);
>    cycle.activate("MyPage");
>  
>
Thanks

I'm using cycle.activate in my action listeners but using it to redirect 
during the
rendering proccess can raise exception.

Yaniv.

>I use the second usualy with directLinks since I already have the
>parameters there
>
>For the second part of your message: Tapestry uses a concept called
>"class
>enhancing" to reduce the amount of code to be written. For instance an
>abstract setter for a parameter has an implementation in an enhanced
>class generated at runtime. 
>
>
>Len
>
>On Mon, 2003-09-08 at 04:33, kpub wrote:
>
>  
>
>>Hi,
>>
>>I implemented subclass of PageRedirectException that holds page object 
>>(for purpose of passing
>>parameters) and also I override the handlePageRedirectException method. 
>>it's seems ok.
>>
>>My questions are
>>    1. Is this is the right way?
>>    2. the PageRedirectException has PageRedirectException(IPage) 
>>constructor, why not to store it
>>        and use it later on?
>>
>>Anothe question out of context :
>>The StaleLink page specification define the page class as 
>>"org.apache.tapestry.pages.StaleLink"
>>StaleLink is abstract class how can it be?
>>
>>
>>Thanks
>>Yaniv.
>>
>>
>>---------------------------------------------------------------------
>>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: Page redirect

Posted by Ovidiu <ov...@recognos.ro>.
I want to know if some page is opened from a link,request,etc or is
refreshed due to a form submit, or any other control contained within...What
is the simplest way to achieve this?

Thanx
Ovidiu



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


Re: Page redirect

Posted by Marilen Corciovei <le...@nemesisit.rdsnet.ro>.
I am using 2 methods for page redirection:

- the PageRedirectException

- the cycle.activate(pageName). 

The later allows 2 methods of passing parameters:

1. MyPage p = (MyPage)cycle.getPage("MyPage");
    p.callMethods....
    cycle.activate(p)

2. Object params[] = ...
    cycle.setServiceParameters(params);
    cycle.activate("MyPage");

I use the second usualy with directLinks since I already have the
parameters there

For the second part of your message: Tapestry uses a concept called
"class
enhancing" to reduce the amount of code to be written. For instance an
abstract setter for a parameter has an implementation in an enhanced
class generated at runtime. 


Len

On Mon, 2003-09-08 at 04:33, kpub wrote:

> Hi,
> 
> I implemented subclass of PageRedirectException that holds page object 
> (for purpose of passing
> parameters) and also I override the handlePageRedirectException method. 
> it's seems ok.
> 
> My questions are
>     1. Is this is the right way?
>     2. the PageRedirectException has PageRedirectException(IPage) 
> constructor, why not to store it
>         and use it later on?
> 
> Anothe question out of context :
> The StaleLink page specification define the page class as 
> "org.apache.tapestry.pages.StaleLink"
> StaleLink is abstract class how can it be?
> 
> 
> Thanks
> Yaniv.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>