You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Tom <ta...@worldware.com> on 2005/06/06 03:48:52 UTC

IExternalPage & listener understanding

Hi -

I just want to make sure I'm understanding things correctly.

The situation:
A page that implements IExternalPage, taking one parameter, that displays a 
blog component. The page also has a "logout" link with a listener.

The problem:
The logout listener doesn't get called when clicked, because an exception 
occurs in the blog component. This is apparently happening since 
activateExternalPage() is not getting called.


My hypothesis:
The listener invocation first rewinds the page, rendering the blog 
component, but does NOT pass in the parameters necessary to render the page.

Ugly solution:
Make sure that every page can render, even without required parameters, 
even when this is an error condition and should result in an exception, or 
error page being displayed.

Better solution: I would think that since an external page requires 
parameters to render, they should be passed to the page when invoking a 
listener on that page. Am I missing something? Is there some standard way 
to handle this?

Thanks,

Tom





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


Re: IExternalPage & listener understanding

Posted by Pablo Ruggia <pr...@gmail.com>.
Are you linking to external service ? If you don't, then
activateExternalPage won't get called.

On 6/5/05, Tom <ta...@worldware.com> wrote:
> Hi -
> 
> I just want to make sure I'm understanding things correctly.
> 
> The situation:
> A page that implements IExternalPage, taking one parameter, that displays a
> blog component. The page also has a "logout" link with a listener.
> 
> The problem:
> The logout listener doesn't get called when clicked, because an exception
> occurs in the blog component. This is apparently happening since
> activateExternalPage() is not getting called.
> 
> 
> My hypothesis:
> The listener invocation first rewinds the page, rendering the blog
> component, but does NOT pass in the parameters necessary to render the page.
> 
> Ugly solution:
> Make sure that every page can render, even without required parameters,
> even when this is an error condition and should result in an exception, or
> error page being displayed.
> 
> Better solution: I would think that since an external page requires
> parameters to render, they should be passed to the page when invoking a
> listener on that page. Am I missing something? Is there some standard way
> to handle this?
> 
> Thanks,
> 
> Tom
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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: IExternalPage & listener understanding

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jun 5, 2005, at 9:48 PM, Tom wrote:

> Hi -
>
> I just want to make sure I'm understanding things correctly.
>
> The situation:
> A page that implements IExternalPage, taking one parameter, that  
> displays a blog component. The page also has a "logout" link with a  
> listener.
>
> The problem:
> The logout listener doesn't get called when clicked, because an  
> exception occurs in the blog component. This is apparently  
> happening since activateExternalPage() is not getting called.

activateExternalPage does not get invoked when clicking on a  
DirectLink (which is what I assume your "logout" link is).  Only  
ExternalLink's call activateExternalPage.

> My hypothesis:
> The listener invocation first rewinds the page, rendering the blog  
> component, but does NOT pass in the parameters necessary to render  
> the page.

Right.  You will have to account for this either by passing the  
necessary parameters and setting them using PageValidateListener or  
by making the parameters persistent.

> Better solution: I would think that since an external page requires  
> parameters to render, they should be passed to the page when  
> invoking a listener on that page. Am I missing something? Is there  
> some standard way to handle this?

The standard ways are mentioned above.  This is certainly an  
interesting issue to debate though.

     Erik



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