You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "LOCHART,DOUGLAS E" <do...@cablespeed.com> on 2005/08/30 22:43:54 UTC
External URL Help
External URL Help
I am tasked to allow the following in our secure tapestry
app:
1) Generate a URL That a person could mail to a
perspective client.
2) That client client would click on the URL to sign up.
3) The URL would activate a Page within our system that
would them look at a parameter in the URL to determine
which person's URL was used to activate this page.
I have been reading chapter 10 in TIA for how to use
the External Link's and pages. It seems fairly
straightforward. Where I am getting stumped is that I
need to give someone a URL like
"www.signmeup.com/app?Salesman=John Doe" or something of
that ilk. This URL that I give needs to activate an
External Page. I guess what I need is to send an already
rendered external link.
How do I do that? I would also need to create the
URL's on the fly so that I could generate one for a new
salesman and they could email it to themselves/write it
down or whatever.
I am still quite green. I have a full Tapestry app
but I have not used alot of bells andn whistles yet. What
I am saying is don't assume I know a whole lot of teh
Tapestry internals.
Thanks Again in Advance.
Doug
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: External URL Help
Posted by Nick Westgate <ni...@key-planning.co.jp>.
Hi Douglas.
Time to learn some of those Tapestry internals, or rather, APIs. ;-)
Look at the source for some of the link components to see how they do it.
In particular you need to use ILink - see page 333 of TIA, or do search
for it if you have the eBook edition.
Anyway, but here's a quick example.
Create a helper method in your page class.
public String getSomeUrl()
{
// get the external service
IEngineService service = getEngine().getService(
Tapestry.EXTERNAL_SERVICE);
// prepare the parameters
Object[] parameters = new Object[]
{
"PageName",
// other paramaters ...
};
// get the link
ILink link = service.getLink(getRequestCycle(), this, parameters);
return link.getAbsoluteURL();
}
Check out the other methods in ILink to what it can do for you.
Cheers,
Nick.
LOCHART,DOUGLAS E wrote:
> External URL Help
>
> I am tasked to allow the following in our secure tapestry app:
>
> 1) Generate a URL That a person could mail to a perspective client.
> 2) That client client would click on the URL to sign up.
> 3) The URL would activate a Page within our system that would them look
> at a parameter in the URL to determine which person's URL was used to
> activate this page.
>
> I have been reading chapter 10 in TIA for how to use the External
> Link's and pages. It seems fairly straightforward. Where I am getting
> stumped is that I need to give someone a URL like
> "www.signmeup.com/app?Salesman=John Doe" or something of that ilk. This
> URL that I give needs to activate an External Page. I guess what I need
> is to send an already rendered external link.
>
> How do I do that? I would also need to create the URL's on the fly
> so that I could generate one for a new salesman and they could email it
> to themselves/write it down or whatever.
>
> I am still quite green. I have a full Tapestry app but I have not
> used alot of bells andn whistles yet. What I am saying is don't assume
> I know a whole lot of teh Tapestry internals.
>
> Thanks Again in Advance.
>
> Doug
>
>
> ---------------------------------------------------------------------
> 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