You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Brill Pappin <br...@pappin.ca> on 2007/10/29 05:15:34 UTC

change the div attributes only, not the content?

How can I change *only* the div attributes (like style class) without
changing the contents of the div?
 
in this example:
<div class="aaa" wicket:id="outter>
    <div wicket:id="inner">this should remain</div>
</div>
 
I want to change the css class from aaa to bbb, but not replace the inner
html.
 
- Brill Pappin
 

Re: change the div attributes only, not the content?

Posted by Eelco Hillenius <ee...@gmail.com>.
On 10/28/07, Brill Pappin <br...@pappin.ca> wrote:
> How can I change *only* the div attributes (like style class) without
> changing the contents of the div?
>
> in this example:
> <div class="aaa" wicket:id="outter>
>     <div wicket:id="inner">this should remain</div>
> </div>
>
> I want to change the css class from aaa to bbb, but not replace the inner
> html.

Attach an attribute modifier to the outter component.

Please dig through the examples first or read one of the books. This
is very basic stuff you don't need the email list for.

Eelco

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


Re: change the div attributes only, not the content?

Posted by Igor Vaynberg <ig...@gmail.com>.
override oncomponenttag and use the passed in Tag object to modify
attributes map

-igor


On 10/28/07, Brill Pappin <br...@pappin.ca> wrote:
> How can I change *only* the div attributes (like style class) without
> changing the contents of the div?
>
> in this example:
> <div class="aaa" wicket:id="outter>
>     <div wicket:id="inner">this should remain</div>
> </div>
>
> I want to change the css class from aaa to bbb, but not replace the inner
> html.
>
> - Brill Pappin
>
>

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