如何在Richfaces 4.3中即时替换外观参数的值? [英] How to replace the value of skin parameter on the fly in Richfaces 4.3?

查看:136
本文介绍了如何在Richfaces 4.3中即时替换外观参数的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有2个应用程序:客户端应用程序和管理应用程序.管理员应用程序中的用户可以更改客户端应用程序的主题.
如果主题包含图像和皮肤,那么它是可行的.图像servlet用于即时从DB读取图像,并且皮肤在动态变化.我已经实现了.
任务更加复杂:管理员应该可以自定义皮肤参数的 ANY .
环境:JSF 2,RichFaces 4.3

我们可以保存参数并创建新的外观文件,但是在这种情况下,我们需要重新部署客户端应用程序(这不是最佳解决方案-已针对自定义外观实现).
我们可以随时更改CSS,但这是大量的类(对于所有RichFaces组件).
问题:我们能否即时替换皮肤参数的值(不是CSS,ECSS,XCSS)?

We have 2 applications: client application and admin application. User in admin application can change theme of client application.
If theme contains image and skin then it is doable. Image servlet is using for reading image from DB on the fly and skin is changing dynamically. I have already implemented it.
Task is more complicated: admin should have the possibility to customize ANY of the skin's parameters.
Environment: JSF 2, RichFaces 4.3

We can save parameters and create new skin file, but in that case we need to redeploy the client application (which is not the best solution - already implemented for custom skin).
We can change CSS on the fly, but it is big amount of classes (for all RichFaces components).
Question: can we replace the value of skin parameter (not CSS, ECSS, XCSS) on the fly?

推荐答案

不支持动态更改外观参数.

Changing skin parameters on the fly is not supported.

换肤将在构建过程中使用从换肤文件(图像和CSS文件)生成的资源.每次更改外观参数时,您都必须生成新资源.

The skinning works off of resources generated from the skin file (image and CSS files) during the build. You'd have to generate new resources every time you'd change a skin parameter.

您可以预先创建一堆皮肤,但如果要允许用户更改每个细节,则没有简单的解决方案.

You can create a bunch of skins in advance but if you want to allow the user to change every detail there is no easy solution.

这篇关于如何在Richfaces 4.3中即时替换外观参数的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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