In Wicket the markup hierarchy has to match the component hierarchy.
Why not add the attribute to the panel itself?
this.add(new AttributeModifier("class", "some class"));
Sven
On 07/31/2013 08:39 PM, saty wrote:
I have a complex panel with several components.
I want to render the page background color different based on some condition
without altering existing code, something like just wrap everything in a new
div tag.
<div wicket:id="envIndicator">
all existent panel stuff goes here
</div>
i tried this.
WebMarkupContainer wmc = new WebMarkupContainer("envIndicator");
wmc.add(new AttributeModifier("class", "some class"));
add(wmc);
but the problem with this is that all wicket tags are expected to be added
to this container which i cant do.
Any way to make this happen?
Let me know if questions, thanks fro your time to help.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/How-to-add-a-div-tag-with-stylesheet-to-wrap-exisiting-panel-tp4660585.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]