> Instead of doing: 
>   page.add(new MyBehavior(components)) 
> do 
>  Behavior b = AttributeModifier.append(....); 
>  for (Component c : components) { 
>     c.add(b) 
>  } 

Certainly that would work,  I am trying to create a re-usable Behavior for
my app that any page wishing to incorporate this feature can add.  I thought
behaviors would be perfect for this, but it seems one event is to early (the
components may not have been all added yet) and another too late (not
allowed to add AttributeModifiers).

I have a common abstract page class from which all my classes extend, and I
certainly could put a method on there, but I'd be relying on the individual
programmer to call the method last in his constructor, rather than relying
on an event which guarantees it.

Seems like there ought to be a goldilocks place to put this...not too early,
not too late.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Behavior-to-modify-attributes-tp4666687p4666714.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to