On Mon, 28 Jan 2013 06:30:19 -0200, Massimo Lusetti <mluse...@gmail.com>
wrote:
There's no battle to fight nor win here.
BTW I want the same behavior for what is the current Index page and all
the
others, for instance if I've a page called MyPage without an activation
context and I call the URL /mypage/some/activation/context this should
produce a 404 the same is valid if the page has an activation context
like:
onActivate(Long longNumber)
{
...
}
and I call the URL /mypage/seeya ... I should call /mypage/1234567890
I think this case is too specific for the framework itself to handle (very
specific redirection URL. I'd just have an onActivate(EventContext), check
the page context and redirect if needed.
For more common cases, Tapestry could just provide some mixins and/or
annotations that, when used, check the page context and do some predefined
action if the context is rejected. For example, one that raises a 404 when
any page context parameter is provided.
I don't think any default action for index pages or removing index pages
from the framework would be a good thing, as they would break existing
code in the worst way possible: silently, without any warnings or
compilation errors. So my suggestion is to just make it very quick and
easy (a.k.a. annotation or mixin) to tell Tapestry that a page doesn't
receive page context and raise a 404 if one is provided. Of couse, we
could provide something like that for other common situations too.
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org