You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2007/10/17 09:45:52 UTC

T5: creating a link

Hi,

I need to create a link in the code so that it can be mailed to users,
example, if I have a page called Confirmation, then I like to be able to
obtain in the code like this:
http://localhost:8080/Confirmation, any way to do this? Thanks.
A.C.
-- 
View this message in context: http://www.nabble.com/T5%3A-creating-a-link-tf4638704.html#a13248634
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5: creating a link

Posted by Nick Westgate <ni...@key-planning.co.jp>.
Not yet. If you desire one, please log a JIRA.

Cheers,
Nick.


Angelo Chen wrote:
> using getLocalName, getLocalPort works, but is there easier way?
> 
> 
> Nick Westgate wrote:
>> Get the rest from:
>>
>>      @Inject
>>      RequestGlobals globals;
>> ...
>>      globals.getHTTPServletRequest().get...
>>
>> Cheers,
>> Nick.
>>
>>
>> Angelo Chen wrote:
>>> Hi Nick,
>>>
>>> This works, however it does not show the main part,
>>> http://localhost:8080,
>>> any way to retrieve this as well? thanks.
>>> A.C.
>>>
>>> Nick Westgate wrote:
>>>>      @Inject
>>>>      private ComponentResources resources;
>>>> ...
>>>>      String url = resources.createPageLink("pageName", false,
>>>> context).toURI();
>>>>
>>>> Cheers,
>>>> Nick.
>>
> 

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


Re: T5: creating a link

Posted by Angelo Chen <an...@yahoo.com.hk>.
using getLocalName, getLocalPort works, but is there easier way?


Nick Westgate wrote:
> 
> Get the rest from:
> 
>      @Inject
>      RequestGlobals globals;
> ...
>      globals.getHTTPServletRequest().get...
> 
> Cheers,
> Nick.
> 
> 
> Angelo Chen wrote:
>> Hi Nick,
>> 
>> This works, however it does not show the main part,
>> http://localhost:8080,
>> any way to retrieve this as well? thanks.
>> A.C.
>> 
>> Nick Westgate wrote:
>>>      @Inject
>>>      private ComponentResources resources;
>>> ...
>>>      String url = resources.createPageLink("pageName", false,
>>> context).toURI();
>>>
>>> Cheers,
>>> Nick.
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-creating-a-link-tf4638704.html#a13250260
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5: creating a link

Posted by Nick Westgate <ni...@key-planning.co.jp>.
Get the rest from:

     @Inject
     RequestGlobals globals;
...
     globals.getHTTPServletRequest().get...

Cheers,
Nick.


Angelo Chen wrote:
> Hi Nick,
> 
> This works, however it does not show the main part, http://localhost:8080,
> any way to retrieve this as well? thanks.
> A.C.
> 
> Nick Westgate wrote:
>>      @Inject
>>      private ComponentResources resources;
>> ...
>>      String url = resources.createPageLink("pageName", false,
>> context).toURI();
>>
>> Cheers,
>> Nick.
>>
>>
> 

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


Re: T5: creating a link

Posted by Angelo Chen <an...@yahoo.com.hk>.
Hi Nick,

This works, however it does not show the main part, http://localhost:8080,
any way to retrieve this as well? thanks.
A.C.

Nick Westgate wrote:
> 
>      @Inject
>      private ComponentResources resources;
> ...
>      String url = resources.createPageLink("pageName", false,
> context).toURI();
> 
> Cheers,
> Nick.
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-creating-a-link-tf4638704.html#a13249323
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5: creating a link

Posted by Nick Westgate <ni...@key-planning.co.jp>.
     @Inject
     private ComponentResources resources;
...
     String url = resources.createPageLink("pageName", false, context).toURI();

Cheers,
Nick.

Angelo Chen wrote:
> Hi,
> 
> I need to create a link in the code so that it can be mailed to users,
> example, if I have a page called Confirmation, then I like to be able to
> obtain in the code like this:
> http://localhost:8080/Confirmation, any way to do this? Thanks.
> A.C.

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