You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jan Jirout <ji...@coroptis.com> on 2009/12/08 11:40:34 UTC
page name generating
Hi,
I have two probably related problems.
1) I have business object Article and User and also I have package
com.myapp.pages. Inside this package are placed pages Article and User.
Both of them works and contains with business object Article and User.
It lead to state when I have to fully specify business object package
name. I woud like to use page names as ArticlePage and UserPage but in
tml file use refference to them as "user" and "article"
2) I have page class files like createNewUser.java and template
createNewUser.tml. When I access this page URL is "createnewnser" but I
would like to see URL "create-new-user".
I think that both problems are related to "name stripping", but I don't
know how to add new rules to this process. It seems to me, that "URL
rewriting" doesn't help at all.
thanks for help
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: page name generating
Posted by Paul Field <pa...@db.com>.
There's a JIRA issue about this with a variety of ideas and discussion:
https://issues.apache.org/jira/browse/TAP5-633
There really isn't a good answer to this at the moment, that I can see.
The URL rewriting means you still need to use the "Page" postfix in .tml
fies (e.g. for links), which I think is confusing.
Currently, we're tending to use "View" as the postfix (e.g. ArticleView
and UserView) because at least it resembles a REST-style verb in the URLs
(as opposed to having the word "page" in the URL - which sucks), but it's
really not ideal for us.
Paul
"Thiago H. de Paula Figueiredo" <th...@gmail.com> wrote on 08/12/2009
11:59:28:
> Em Tue, 08 Dec 2009 08:40:34 -0200, Jan Jirout <ji...@coroptis.com>
> escreveu:
>
> > Hi,
>
> Hi!
>
> > I think that both problems are related to "name stripping", but I
don't
> > know how to add new rules to this process. It seems to me, that "URL
> > rewriting" doesn't help at all.
>
> URL rewriting is definitely the best solution to both your problems.
Using
> it, you have total control about your URLs.
>
> The "I woud like to use page names as ArticlePage and UserPage but in
tml
> file use refference to them as 'user' and 'article'" could be solved by
> decorating or advising the ComponentSource and changing the parameter of
> the getPage() method. I suggest you to not do that, as one of the
beauties
> of Tapestry is exactly that the page class, the template and how you
> reference the page are all the same.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
Re: page name generating
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Tue, 08 Dec 2009 08:40:34 -0200, Jan Jirout <ji...@coroptis.com>
escreveu:
> Hi,
Hi!
> I think that both problems are related to "name stripping", but I don't
> know how to add new rules to this process. It seems to me, that "URL
> rewriting" doesn't help at all.
URL rewriting is definitely the best solution to both your problems. Using
it, you have total control about your URLs.
The "I woud like to use page names as ArticlePage and UserPage but in tml
file use refference to them as 'user' and 'article'" could be solved by
decorating or advising the ComponentSource and changing the parameter of
the getPage() method. I suggest you to not do that, as one of the beauties
of Tapestry is exactly that the page class, the template and how you
reference the page are all the same.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da
Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org