You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nomer Nominus <ta...@outlook.com> on 2013/05/10 13:18:16 UTC

Creating specific url link for specific object

I have FullArticle tml page, and all articles get url link in the browser like http://localhost:9999/fullarticle , however I don't want this to be like that, instead I would like it to be http://localhost:9999/fullarticle/Article1 or perhaps even http://localhost:9999/Article1

How to achieve this behavior?
 		 	   		  

Re: Creating specific url link for specific object

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 10 May 2013 21:15:18 -0300, Taha Hafeez Siddiqi  
<ta...@gmail.com> wrote:

> Hi
>
> @PageActivitationContext and @Persist are two ways to persist data  
> across requests. So they are mutually exclusive.
>
> @PageActiviationContext adds the data as a context to the url while  
> @Persist saves it in session(or cookie). You should always prefer the  
> former and avoid the latter.
>
> Regarding speed, there isn't be any substantial difference.
>
> Can you share some code so we can see what you are trying to do.
>
> BTW sorry for the wrong pointer, I have been using URL-rewriting a lot  
> these days :)
>
> regards
> Taha
>
> On 11-May-2013, at 5:32 AM, Nomer Nominus <ta...@outlook.com> wrote:
>
>> Hi! Thanks, @PageActivationContext annotation worked like a charm for  
>> this issue. However, one more thing concerns me about this. Since I  
>> have @Persist and @PageActivationContext over some property, does this  
>> require more round times for connection and with it is slower than  
>> without using it?
>>
>> Date: Fri, 10 May 2013 05:34:14 -0700
>> From: ml-node+s1045711n5721360h77@n5.nabble.com
>> To: tapestrius@outlook.com
>> Subject: Re: Creating specific url link for specific object
>>
>>
>>
>> 	On Fri, 10 May 2013 08:51:24 -0300, Taha Siddiqi
>>
>> <[hidden email]> wrote:
>>
>>
>>> Please go through http://tapestry.apache.org/url-rewriting.html.
>>
>>
>> Actually, read this: http://tapestry.apache.org/page-navigation.html,
>>
>> specially the "Page Activation" section. No URL rewriting needed. Just  
>> use
>>
>> the page activation context to pass the id of the article, so your page
>>
>> knows which one to show.
>>
>>
>> --
>>
>> Thiago H. de Paula Figueiredo
>>
>>
>> ---------------------------------------------------------------------
>>
>> To unsubscribe, e-mail: [hidden email]
>>
>> For additional commands, e-mail: [hidden email]
>>
>>
>>
>>
>> 	
>> 	
>> 	
>> 	
>>
>> 	
>>
>> 	
>> 	
>> 		If you reply to this email, your message will be added to the  
>> discussion below:
>> 		http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Creating-specific-url-link-for-specific-object-tp5721353p5721360.html
>> 	
>> 	
>> 		
>> 		To unsubscribe from Apache Tapestry Mailing List Archives, click here.
>>
>> 		NAML
>> 	 		 	   		
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


-- 
Thiago H. de Paula Figueiredo

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


Re: Creating specific url link for specific object

Posted by Taha Hafeez Siddiqi <ta...@gmail.com>.
Hi

@PageActivitationContext and @Persist are two ways to persist data across requests. So they are mutually exclusive.

@PageActiviationContext adds the data as a context to the url while @Persist saves it in session(or cookie). You should always prefer the former and avoid the latter.

Regarding speed, there isn't be any substantial difference.

Can you share some code so we can see what you are trying to do.

BTW sorry for the wrong pointer, I have been using URL-rewriting a lot these days :)

regards
Taha

On 11-May-2013, at 5:32 AM, Nomer Nominus <ta...@outlook.com> wrote:

> Hi! Thanks, @PageActivationContext annotation worked like a charm for this issue. However, one more thing concerns me about this. Since I have @Persist and @PageActivationContext over some property, does this require more round times for connection and with it is slower than without using it?
> 
> Date: Fri, 10 May 2013 05:34:14 -0700
> From: ml-node+s1045711n5721360h77@n5.nabble.com
> To: tapestrius@outlook.com
> Subject: Re: Creating specific url link for specific object
> 
> 
> 
> 	On Fri, 10 May 2013 08:51:24 -0300, Taha Siddiqi  
> 
> <[hidden email]> wrote:
> 
> 
>> Please go through http://tapestry.apache.org/url-rewriting.html.
> 
> 
> Actually, read this: http://tapestry.apache.org/page-navigation.html,  
> 
> specially the "Page Activation" section. No URL rewriting needed. Just use  
> 
> the page activation context to pass the id of the article, so your page  
> 
> knows which one to show.
> 
> 
> -- 
> 
> Thiago H. de Paula Figueiredo
> 
> 
> ---------------------------------------------------------------------
> 
> To unsubscribe, e-mail: [hidden email]
> 
> For additional commands, e-mail: [hidden email]
> 
> 
> 
> 
> 	
> 	
> 	
> 	
> 
> 	
> 
> 	
> 	
> 		If you reply to this email, your message will be added to the discussion below:
> 		http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Creating-specific-url-link-for-specific-object-tp5721353p5721360.html
> 	
> 	
> 		
> 		To unsubscribe from Apache Tapestry Mailing List Archives, click here.
> 
> 		NAML
> 	 		 	   		  


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


RE: Creating specific url link for specific object

Posted by Nomer Nominus <ta...@outlook.com>.
Hi! Thanks, @PageActivationContext annotation worked like a charm for this issue. However, one more thing concerns me about this. Since I have @Persist and @PageActivationContext over some property, does this require more round times for connection and with it is slower than without using it?

Date: Fri, 10 May 2013 05:34:14 -0700
From: ml-node+s1045711n5721360h77@n5.nabble.com
To: tapestrius@outlook.com
Subject: Re: Creating specific url link for specific object



	On Fri, 10 May 2013 08:51:24 -0300, Taha Siddiqi  

<[hidden email]> wrote:


> Please go through http://tapestry.apache.org/url-rewriting.html.


Actually, read this: http://tapestry.apache.org/page-navigation.html,  

specially the "Page Activation" section. No URL rewriting needed. Just use  

the page activation context to pass the id of the article, so your page  

knows which one to show.


-- 

Thiago H. de Paula Figueiredo


---------------------------------------------------------------------

To unsubscribe, e-mail: [hidden email]

For additional commands, e-mail: [hidden email]




	
	
	
	

	

	
	
		If you reply to this email, your message will be added to the discussion below:
		http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Creating-specific-url-link-for-specific-object-tp5721353p5721360.html
	
	
		
		To unsubscribe from Apache Tapestry Mailing List Archives, click here.

		NAML
	 		 	   		  

Re: Creating specific url link for specific object

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 10 May 2013 08:51:24 -0300, Taha Siddiqi  
<ta...@gmail.com> wrote:

> Please go through http://tapestry.apache.org/url-rewriting.html.

Actually, read this: http://tapestry.apache.org/page-navigation.html,  
specially the "Page Activation" section. No URL rewriting needed. Just use  
the page activation context to pass the id of the article, so your page  
knows which one to show.

-- 
Thiago H. de Paula Figueiredo

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


Re: Creating specific url link for specific object

Posted by Bryan Lewis <jb...@gmail.com>.
When I read the original post, I  thought all he needed was a proper pair
of onActivate/onPassivate methods.  To get the first form of the url anyway.



On Fri, May 10, 2013 at 7:51 AM, Taha Siddiqi <ta...@gmail.com>wrote:

> Please go through http://tapestry.apache.org/url-rewriting.html.
>
> Also http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/is a must read for url rewriting.
>
> regards
> Taha
>
> On May 10, 2013, at 4:48 PM, Nomer Nominus wrote:
>
> > I have FullArticle tml page, and all articles get url link in the
> browser like http://localhost:9999/fullarticle , however I don't want
> this to be like that, instead I would like it to be
> http://localhost:9999/fullarticle/Article1 or perhaps even
> http://localhost:9999/Article1
> >
> > How to achieve this behavior?
> >
>
>

Re: Creating specific url link for specific object

Posted by Taha Siddiqi <ta...@gmail.com>.
Please go through http://tapestry.apache.org/url-rewriting.html.

Also http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/ is a must read for url rewriting.

regards
Taha

On May 10, 2013, at 4:48 PM, Nomer Nominus wrote:

> I have FullArticle tml page, and all articles get url link in the browser like http://localhost:9999/fullarticle , however I don't want this to be like that, instead I would like it to be http://localhost:9999/fullarticle/Article1 or perhaps even http://localhost:9999/Article1
> 
> How to achieve this behavior?
>