You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alec Swan <al...@gmail.com> on 2011/04/18 05:00:15 UTC

Dynamically injecting CSS on panel swap

Hello,

I have a page with multiple tabs which I implemented using AJAX-based
panel-swapping approach. The CSS files are injected in the constructor
of each panel using
add(CSSPackageResource.getHeaderContribution(resourceRef, media)).
This works for the first tab rendered. However, when another tab is
selected the CSS file for that tab does not get dynamically injected
and the tab uses the CSS file of the previous tab.

What is the best way to swap CSS files in this situation?

Thanks,

Alec

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


Re: Dynamically injecting CSS on panel swap

Posted by Pedro Santos <pe...@gmail.com>.
Sounds like a bug. The expected behavior is to have the selected panel CSS
dynamically injected. Please send us a quickstart reproducing the problem.

On Mon, Apr 18, 2011 at 12:00 AM, Alec Swan <al...@gmail.com> wrote:

> Hello,
>
> I have a page with multiple tabs which I implemented using AJAX-based
> panel-swapping approach. The CSS files are injected in the constructor
> of each panel using
> add(CSSPackageResource.getHeaderContribution(resourceRef, media)).
> This works for the first tab rendered. However, when another tab is
> selected the CSS file for that tab does not get dynamically injected
> and the tab uses the CSS file of the previous tab.
>
> What is the best way to swap CSS files in this situation?
>
> Thanks,
>
> Alec
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos