如何在 adf 框架中定义多个样式表 [英] How to define more than one stylesheet in adf framework

查看:60
本文介绍了如何在 adf 框架中定义多个样式表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了 adf 蒙皮问题.我的样式表跨越了 1800 个类.IE 有 4000 个样式类的限制.在渲染时,ADF 添加了自己的类.所以它跨越了 4000 并且我在工作表的最后一个提到的样式不能单独在 IE 中工作.我需要为同一个应用程序定义一个新的样式表.

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.

我尝试在 adf-faces-config.xml 中添加更多皮肤系列.没用.

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

请帮忙.

提前致谢.

推荐答案

我不是 100% 确定创建单独的 CSS 是否会解决您的问题,并且我同意在习惯了多个 css 定义并且只加载一个 css 之后对于特定的页面有其自身的优势.

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.

你可以做的一件事是组织 CSS,拥有 1800 个类可能不是 Web 应用程序中的合适方式,因为 Web 应用程序应该促进外观和感觉的一致性.

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.

在 oracle 论坛中有一个很好的讨论,可能会在这方面对您有所帮助,尤其是在使用 el 表达式检查当前视图以动态切换皮肤方面.

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.

同一应用程序中的多个皮肤

我还在那个论坛中提到了使用皮肤添加以及我为我们的应用程序使用皮肤添加的原因,即使我们没有达到您拥有的样式类的数量,我们的 css 已经达到 3k只有 600 行用于特定组件的行,其他所有内容都是 styleClass.我们还戏剧性地使用了特立尼达皮肤提供的继承"-tr-inherit,这确实为我们节省了大量编码.

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.

这篇关于如何在 adf 框架中定义多个样式表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆