I like the idea of behaviours. I'm working on them now. They'll be a
little bit adjusted, but the general idea will be the same. And people
can use attribute modifiers in the same fashion as they did before.

I agree with Igor there isn't much wrong with the code example. Might
be a bit verbose, but I think it would be good practice if you start
out a couple of helper classes for such things when you start a
project. That's another thing that should be an advantage of Wicket/
CBD in general; you can easily create your own custom components that
save code etc. for your specific situation.

Eelco


On 11/6/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> It might be too many lines, but i kind of like it. the function of the code
> is clear and obvious. while the behaviours might make things better, i think
> the above is still a good way to write code .
>
>  -Igor
>
>
> On 11/6/05, Ralf Ebert <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > > :) Np. Maybe the behaviour idea would be more generalized than
> > > attribute modifiers. Let's see where that discussion leads us.
> > just had to write the thing which made me angry about it again, so I
> > thought I should provide the use case in code:
> >
> > someCheckBox.add(new AttributeModifier("disabled", true, new Model
> > ("disabled")) {
> >
> >         public boolean isEnabled() {
> >                 return ((QueryPosition)
> getModelObject()).isAllowedForDocument
> > (getDocument());
> >         }
> >
> > });
> >
> > This code definitely is too many lines of code just for disabling a
> > component according to some model data but to my knowledge there is
> > no better way to do it... Actually the AttributeModifier is
> > completely innocent; its just not very suitable for disabling
> > components :)
> >
> > Regards,
> > Ralf
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by:
> > Tame your development challenges with Apache's Geronimo App Server.
> Download
> > it for free - -and be entered to win a 42" plasma tv or your very own
> > Sony(tm)PSP.  Click here to play:
> http://sourceforge.net/geronimo.php
> > _______________________________________________
> > Wicket-develop mailing list
> > [email protected]
> >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >
>
>


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to