Re: AttibuteModifier question
use AttributeAppender? Ernesto On Wed, Apr 6, 2011 at 8:26 AM, drf wrote: > Just as one can use > > component.add(new AttributeModifier("class", new Model(""))); > > to modify the css class for a component, is there a way to either > 1. get the existing class value, > 2. or alternativly to append a class to the existing css classes set for > that component, rather than replacing the existing ones. > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/AttibuteModifier-question-tp3429987p3429987.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 > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AttibuteModifier question
If you're outside of the onComponentTag you can do: String cssClass = component.getMarkupAttributes().getString("class"); Regards Robert On 04/06/2011 08:36 AM, Wilhelmsen Tor Iver wrote: 1. get the existing class value, Only when parsing the markup in onComponentTag(). - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AttibuteModifier question
for 1) you can get that in oncomponenttag for 2) use attribute appender On Wed, Apr 6, 2011 at 11:56 AM, drf wrote: > Just as one can use > > component.add(new AttributeModifier("class", new Model(""))); > > to modify the css class for a component, is there a way to either > 1. get the existing class value, > 2. or alternativly to append a class to the existing css classes set for > that component, rather than replacing the existing ones. > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/AttibuteModifier-question-tp3429987p3429987.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 > > -- thank you, regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: AttibuteModifier question
> 1. get the existing class value, Only when parsing the markup in onComponentTag(). - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AttibuteModifier question
Just as one can use component.add(new AttributeModifier("class", new Model(""))); to modify the css class for a component, is there a way to either 1. get the existing class value, 2. or alternativly to append a class to the existing css classes set for that component, rather than replacing the existing ones. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AttibuteModifier-question-tp3429987p3429987.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