tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Massimo Lusetti <mluse...@gmail.com>
Subject Re: How to handle 404 nicely (TAP5-879)
Date Mon, 28 Jan 2013 11:15:24 GMT
On Mon, Jan 28, 2013 at 11:58 AM, Thiago H de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> 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.
I don't see any specific here, it's just a matter of URL and the
corresponding page used to render the response, in some cases I feel
tapestry is too smart.

> 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.
Completely agree about breaking existing code, it's my main concern, but I
think the platform (tapestry5) must have a natural way (no user
intervention like place annotation) to handle requests to URL which
actually do not exists.

As I said I'm against an annotation as the solution but I understand it
could be the way to go to deprecate a particular behavior which will be
changed in a future version.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message