You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joshua Jackson <jo...@gmail.com> on 2008/01/18 05:32:47 UTC
T5: Pretty URL
Dear all,
If I have pages under my pages package with this structures:
+ project
+ -- Detail.java
+ project.backlog
+ -- Panel.java
Is it possible to have these URL :
http://localhost:8080/pjx/project/999/backlog/panel
?
So the id is in between instead of at the end of the URL to refer that the
id belongs to the project
Thanks in advance.
--
I'm a coder not a drag-n-dropper
Blog: http://joshuajava.wordpress.com/
Re: T5: Pretty URL
Posted by Joshua Jackson <jo...@gmail.com>.
Thanks for the confirmation Howard,
I'm going to find a workaround for this :)
Best Regards,
On 1/18/08, Howard Lewis Ship <hl...@gmail.com> wrote:
> Sorry, no this isn't directly possible. Tapestry is pretty rigid
> about the format of the URLs: It's always the logical page name
> ("project/backlog/panel" for class (root).pages.project.backlog.Panel
> then the activation context (the 999 id in this example).
>
> It's basically like this: more flexibility requires more (and more,
> and more) configuration which is entirely backwards from where
> Tapestry is coming from.
--
I'm a coder not a drag-n-dropper
Blog: http://joshuajava.wordpress.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: Pretty URL
Posted by Fernando Padilla <fe...@alum.mit.edu>.
But you can always put in a normal Webapp Filter ahead of Tapestry that
would munge the url as you see fit (and capture the information into a
Request.attribute).. I do this myself in a different way.. (clip off
the leading directory in the url). But here is some pseudo-code:
project/999/blah
convert into:
request.setattribute(999)
project/blah
then in your page you could recover that project id through
requestGlobals.gethttpserveletrequest.getattribute(projectId).
Howard Lewis Ship wrote:
> Sorry, no this isn't directly possible. Tapestry is pretty rigid
> about the format of the URLs: It's always the logical page name
> ("project/backlog/panel" for class (root).pages.project.backlog.Panel
> then the activation context (the 999 id in this example).
>
> It's basically like this: more flexibility requires more (and more,
> and more) configuration which is entirely backwards from where
> Tapestry is coming from.
>
> On Jan 17, 2008 8:32 PM, Joshua Jackson <jo...@gmail.com> wrote:
>> Dear all,
>>
>> If I have pages under my pages package with this structures:
>> + project
>> + -- Detail.java
>> + project.backlog
>> + -- Panel.java
>>
>> Is it possible to have these URL :
>> http://localhost:8080/pjx/project/999/backlog/panel
>>
>> ?
>>
>> So the id is in between instead of at the end of the URL to refer that the
>> id belongs to the project
>>
>> Thanks in advance.
>>
>> --
>> I'm a coder not a drag-n-dropper
>>
>> Blog: http://joshuajava.wordpress.com/
>>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: Pretty URL
Posted by Angelo Chen <an...@yahoo.com.hk>.
Hi,
How about adding a dispatcher which will inspect the path first, if it's
http://localhost:8080/pjx/project/999/backlog/panel then change it to:
http://localhost:8080/pjx/project/backlog/panel/999,
possible?
Howard Lewis Ship wrote:
>
> Sorry, no this isn't directly possible. Tapestry is pretty rigid
> about the format of the URLs: It's always the logical page name
> ("project/backlog/panel" for class (root).pages.project.backlog.Panel
> then the activation context (the 999 id in this example).
>
>
--
View this message in context: http://www.nabble.com/T5%3A-Pretty-URL-tp14946540p14947987.html
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: Pretty URL
Posted by Howard Lewis Ship <hl...@gmail.com>.
Sorry, no this isn't directly possible. Tapestry is pretty rigid
about the format of the URLs: It's always the logical page name
("project/backlog/panel" for class (root).pages.project.backlog.Panel
then the activation context (the 999 id in this example).
It's basically like this: more flexibility requires more (and more,
and more) configuration which is entirely backwards from where
Tapestry is coming from.
On Jan 17, 2008 8:32 PM, Joshua Jackson <jo...@gmail.com> wrote:
> Dear all,
>
> If I have pages under my pages package with this structures:
> + project
> + -- Detail.java
> + project.backlog
> + -- Panel.java
>
> Is it possible to have these URL :
> http://localhost:8080/pjx/project/999/backlog/panel
>
> ?
>
> So the id is in between instead of at the end of the URL to refer that the
> id belongs to the project
>
> Thanks in advance.
>
> --
> I'm a coder not a drag-n-dropper
>
> Blog: http://joshuajava.wordpress.com/
>
--
Howard M. Lewis Ship
Creator Apache Tapestry and Apache HiveMind
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org