well, however you fix it, imho the way it is now is broken.

-igor


On 3/30/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:

It seemed a bit odd to me to punish our users with multiple calls
because of something we didn't design well in the first place. Typical
case of where we should have provided an empty template method. It
would have my preference to fix that rather than doing the isEnabled
call twice.

Eelco


On 3/29/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> i think you should leave the isenabled check. isbehavioraccepted does
it,
> sure. but as users override it, will they remember to call super? its
not in
> javadoc and is not enforced. and if they do not call super they can
override
> what is behavior's choice not the components.
>
> -igor
>
>
> On 3/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Author: ehillenius
> > Date: Thu Mar 29 20:31:46 2007
> > New Revision: 523920
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=523920
> > Log:
> > header contributions test on isBehaviorAccepted
> >
> > Modified:
> >     incubator/wicket/branches/wicket-1.x/jdk-1.4
> > /wicket/src/main/java/wicket/Component.java
> >
> > Modified: incubator/wicket/branches/wicket-1.x/jdk-1.4
> > /wicket/src/main/java/wicket/Component.java
> > URL:
> >
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java?view=diff&rev=523920&r1=523919&r2=523920
> >
> >
==============================================================================
> > --- incubator/wicket/branches/wicket-1.x/jdk-1.4
/wicket/src/main/java/wicket/Component.java
> > (original)
> > +++ incubator/wicket/branches/wicket-1.x/jdk-1.4
/wicket/src/main/java/wicket/Component.java
> > Thu Mar 29 20:31:46 2007
> > @@ -1812,7 +1812,7 @@
> >                                 while (iter.hasNext())
> >                                 {
> >                                         IBehavior behavior =
> > (IBehavior)iter.next();
> > -                                       if (behavior instanceof
> > IHeaderContributor && behavior.isEnabled(this))
> > +                                       if (behavior instanceof
> > IHeaderContributor && isBehaviorAccepted(behavior))
> >                                         {
> >
> >
((IHeaderContributor)behavior).renderHead(
> > container.getHeaderResponse());
> >                                         }
> >
> >
> >
>

Reply via email to