On Tue, 02 Nov 2010 10:30:52 -0200, Vjeran Marcinko
<vjeran.marci...@email.t-com.hr> wrote:
Hi,
Hi, Vjeran!
What I needed was parameter naming since ordering was not sufficient. I
ended up coding my own "context parser" that treats every parameter with
odd index as "name", so you have:
http:///localhost/myapp/mypage/argname1/argvalue1/argname2/argvalue2/...
I consider that cumbersome. There were some other cases that would be
too long to explain here.
I agree that something like your context parser should be added to
Tapestry. It's not hard to make a reusable one. This was discussed in the
mailing list at list once with a couple of interesting solutions. Please
post a JIRA and I'll implement it when I have time.
Regarding cases with page hiererchy...
Lots of times you have number of web pages that are dedicated to some
entity (eg Company), and you want only Users belonging to that Company
to have access to those pages. But that doesn't mean that all such
"company" pages have "companyId" in URL, they can also have some
"employeeId" that belongs to that company (when you edit employee data).
Almost any kind of cross-page solution, as this scenario, is much better
implemented as a ComponentRequestFilter. You can put all the logic in a
single, easily unit tested class and with almost no effort (just a
contribution to the ComponentRequestHandler service) apply it to all page
requests, both render and action ones.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org