You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Vince Marco <vm...@mac.com> on 2003/08/15 05:29:35 UTC

Activating a GenericLink from a Page class

I have a DirectLink which calls a listener method in my Page class.  I 
prepare a URL to execute over at the MapQuest folks (ok, really it is an 
integration server in our web farm).  So, how do I "activate" an 
external URL?

Vince



Re: Activating a GenericLink from a Page class

Posted by Vince Marco <vm...@mac.com>.
Ok, I realize after walking away from the problem for a while that your 
response is entirely correct.  A GenericLink works because it accesses 
beyond the ServletContext by rendering a link to the HTML, and therefore 
the server is not accessing beyond the ServletContext.....the browser 
is.  This is a limitation of the servlet specification (page 40 of 2.2).

It reminds me just how powerful the Tapestry API is, in that it makes me 
forget about the servlet spec and its limitations.  Yet we still have to 
live within it.  A redirect will have to do.  Just thought I'd share my 
epiphany with any others sharing the same question.

Vince

> I will try this as a fallback.  Since I'm porting an existing app 
> which doesn't redirect the client...I need to attempt to do this 
> without client-side redirect.  But maybe it will work.  Thanks for the 
> suggestion.
>
> Why is it possible to do this through a GenericLink in the template, 
> but not so straight-forward from the Java class?  I would think I 
> should be able to do anything I can in a template also in the Page class.
>
> What I really seeing needed here is the ability to call 
> cycle.activate(Url), for forwarding to external links.  I would do it 
> from the template, but this is in response to a form submit, so I'm 
> already in the Page class.
>



Re: Activating a GenericLink from a Page class

Posted by Vince Marco <vm...@mac.com>.
I will try this as a fallback.  Since I'm porting an existing app which 
doesn't redirect the client...I need to attempt to do this without 
client-side redirect.  But maybe it will work.  Thanks for the 
suggestion.

Why is it possible to do this through a GenericLink in the template, 
but not so straight-forward from the Java class?  I would think I 
should be able to do anything I can in a template also in the Page 
class.

What I really seeing needed here is the ability to call 
cycle.activate(Url), for forwarding to external links.  I would do it 
from the template, but this is in response to a form submit, so I'm 
already in the Page class.

Vince

On Saturday, August 16, 2003, at 09:39  am, Mindbridge wrote:

> Just curious -- wouldn't RedirectException do what you want? That would
> cause a client-side redirect to the URL you want.
>
> Possibly not what you want, but thought I should mention it -- it is 
> very
> easy to use.
>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Vince Marco
Enterprise Frameworks, Inc.
vmarco@mac.com

Re: Activating a GenericLink from a Page class

Posted by Mindbridge <mi...@yahoo.com>.
Hi

Just curious -- wouldn't RedirectException do what you want? That would
cause a client-side redirect to the URL you want.

Possibly not what you want, but thought I should mention it -- it is very
easy to use.

-mb

----- Original Message ----- 
From: "Vince Marco" <vm...@mac.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, August 15, 2003 6:29 AM
Subject: Activating a GenericLink from a Page class


> I have a DirectLink which calls a listener method in my Page class.  I
> prepare a URL to execute over at the MapQuest folks (ok, really it is an
> integration server in our web farm).  So, how do I "activate" an
> external URL?
>
> Vince
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: Activating a GenericLink from a Page class

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
First off, for an external system to activate logic inside a Tapestry app, you should use the
external service (not the direct service and DirectLink component) ... or create your own engine
service.

You can access the external service in your own code to create callbacks that activate your pages.

Please check the archives; I posted a DirectArea component recently that showed how to get an engine
service and get it to produce a URL for you.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Vince Marco [mailto:vmarco@mac.com] 
> Sent: Thursday, August 14, 2003 11:30 PM
> To: Tapestry users
> Subject: Activating a GenericLink from a Page class
> 
> 
> I have a DirectLink which calls a listener method in my Page 
> class.  I 
> prepare a URL to execute over at the MapQuest folks (ok, 
> really it is an 
> integration server in our web farm).  So, how do I "activate" an 
> external URL?
> 
> Vince
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>