On Mon, 28 Jan 2013 17:02:48 -0200, Kalle Korhonen
<kalle.o.korho...@gmail.com> wrote:
As evident from responses though, it's not easy to pick a winner from the
proposed half solutions. I think it's going to come down to being able to
somehow handle 404s with onActivate(EventContext) present.
From tapestry-core side, I don't think that's possible. It would need
psychic powers. Our suggestion is adding automatically the 404 logic for
pages without any onActivate() method. Now I think we could exclude
parameterless onActivate() from this logic.
If we could atleast tell the max number of accepted context parameters
that'd likely
address a large number of cases.
I agree with that. I probably wouldn't agree with type checking.
I agree with Massimo though, a completely
new annotation just for this doesn't sound very lucrative. Perhaps a new
attribute to @OnEvent - although I don't know if it can be as useful for
other than activate event types.
Almost all "activate" event handler methods are using the method name
convention (aka onActivate(...)), so the attribute in @OnEvent would be
almost useless for handling 404 errors, specially in already existing
code. The Steve's solution already covers most pages without any source
code change.
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org