Widget css and renderPartial

I'm trying a design based on a first controller displaying a grid (based on the older crud list format). To the grid I added a clickable colorbar which uses jQuery/ajax replaceWith to have a second controller load a second clickable grid using renderPartial. I may or may not use the CLinkPager (clicking the pager will result in a full page reload). But I noticed that if the first grid doesn't use the pager, the pager.css isn't loaded at all, thus the second grid pager is rendered incorrectly. I don't necessarily need the pager in my solution but this might be a problem with other more relevant widgets.

How can I force a widget css to load?

/Tommy

Good question. Unfortunately, I don't have a perfect answer to this.

This is similar to the smart actions problem.

The general direction is to register the CSS files in the original page, even if it doesn't have the pager yet. The question is how to do this nicely. Let's keep thinking.

I studied the Smart Actions thread again and decided to override the CLinkPager class:



  public function run()


  {


    $this->registerClientScript();


    parent::run();


  }


Noticed that the page url seems to have changed, now addressing the second controller/view used (I guess). Still have to figure out how to hook the dynamic reloading.

/Tommy