You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by saty <sa...@gmail.com> on 2013/07/31 20:39:51 UTC

How to add a div tag with stylesheet to wrap exisiting panel

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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How to add a div tag with stylesheet to wrap exisiting panel

Posted by saty <sa...@gmail.com>.
Thanks Sven, i will try that.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-a-div-tag-with-stylesheet-to-wrap-exisiting-panel-tp4660585p4660588.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: How to add a div tag with stylesheet to wrap exisiting panel

Posted by saty <sa...@gmail.com>.
The div style does work as suggested but it covers the whole panel and hides
everything. Any way to fix this, it should work as a background.
I tried the z-index but it does not seem to work.
Thanks



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-a-div-tag-with-stylesheet-to-wrap-exisiting-panel-tp4660585p4660634.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: How to add a div tag with stylesheet to wrap exisiting panel

Posted by saty <sa...@gmail.com>.
No, just the <wicket:panel>



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-a-div-tag-with-stylesheet-to-wrap-exisiting-panel-tp4660585p4660598.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: How to add a div tag with stylesheet to wrap exisiting panel

Posted by Sven Meier <sv...@meiers.net>.
> what i will have to do on markup side

This shouldn't need any markup change.

Is your panel bound to a <wicket:container> ?

Sven

On 07/31/2013 10:37 PM, saty wrote:
> Sorry to ask again but what i will have to do on markup side. I added this
> but dont find the attribute (style-sheet) appearing anywhere in HTML source
> to see whats happening.
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-a-div-tag-with-stylesheet-to-wrap-exisiting-panel-tp4660585p4660593.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


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


Re: How to add a div tag with stylesheet to wrap exisiting panel

Posted by saty <sa...@gmail.com>.
Sorry to ask again but what i will have to do on markup side. I added this
but dont find the attribute (style-sheet) appearing anywhere in HTML source
to see whats happening.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-a-div-tag-with-stylesheet-to-wrap-exisiting-panel-tp4660585p4660593.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: How to add a div tag with stylesheet to wrap exisiting panel

Posted by Sven Meier <sv...@meiers.net>.
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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


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