Search code examples
stylesheetskinningoracle-adf

How to define more than one stylesheet in adf framework


I am facing a problem with adf skining. My style sheet crossed 1800 classes. IE has a limitation of 4000 style classes. While rendering, ADF adds its own classes. So it crosses 4000 and the styles I am referring at the last of my sheet are not working in IE alone. I need to define a new style sheet for same application.

I have tried adding one more skin-family in adf-faces-config.xml. Did not work.

Please help.

Thanks in advance.


Solution

  • I am not 100% sure if creating a separate CSS will resolve your issue, and I do agree that after being used to multiple css definition and only loading a css for a particular page has its own advantages.

    One thing that you can do though is organize the CSS, having 1800 classes might not be the appropriate way to go in a WebApp since a webapp should promote consistency in look and feel.

    There is a good discussion in oracle forums that might help you on this, especially on the use of an el expression check on your current view to switch your skin on the fly.

    Multiple Skin in the same application

    I also mentioned in that forum about using skin-addition as well as my reason on taking up skin addition for our app, even though we didn't get to the number of styleClasses that you have, our css is already hitting 3k lines with only 600 lines for component specific and everything else is styleClass. We've also dramatically used the "inhertance" which trinidad skin offers -tr-inherit this really saved us in a lot of coding.