tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Stepanov <denis.stepa...@gmail.com>
Subject Re: [VOTE] TAP5-2070 Implement logic to handle requests to unknown URL as 404
Date Thu, 14 Feb 2013 10:29:53 GMT
I like the idea also but implementation is not perfect.

- You're using instanceof to check if context is empty, but I would say correct way is to
check the size of the context.
- Not-handled response logic should be abstract, what if someone wants a different response
code or a different behaviour?
- I don't like that you can only have one or another, what if I want one page with onactivate
exactly matching event and another page to have the old behaviour.
 
Could it be solved by introducing something like onRequiredActivate? If page handles event
"requredActivate" (ComponentModel#handlesEvent) use the new behaviour otherwise the old one.

Denis

Feb 13, 2013 v 4:24 PM, Massimo Lusetti <mlusetti@gmail.com>:

> Yes, pleas correct any stupid name.
> 
> 
> On Wed, Feb 13, 2013 at 4:16 PM, Bob Harner <bobharner@gmail.com> wrote:
> 
>> A very minor issue: The "SEND_404_TO_UNWANTED_ACTIVATION_CONTEXT" name
>> seems to miss the mark a bit.
>> 
>> For consistency with other symbol names, maybe
>> "UNKNOWN_ACTIVATION_CONTEXT_CHECK_ENABLED" ?
>> 
>> 
>> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/SymbolConstants.html
>> 
>> On Wed, Feb 13, 2013 at 9:55 AM, Massimo Lusetti <mlusetti@gmail.com>
>> wrote:
>>> On Wed, Feb 13, 2013 at 3:36 PM, Ulrich Stärk <uli@spielviel.de> wrote:
>>> 
>>> +1 on the idea, -1 on the implementation.
>>>> 
>>>> In PageActivatorImpl you set send404 from the symbol but never check on
>> it.
>>>> 
>>>> 
>>> Right.
>>> The patch is wrong, It's not PRODUCTION_MODE that has to be check
>>> is SEND_404_TO_UNWANTED_ACTIVATION_CONTEXT... That's the honeypot for
>>> everyone commenting the issue ;-)
>>> 
>>> --
>>> Massimo
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>> 
>> 
> 
> 
> -- 
> Massimo
> http://meridio.blogspot.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message