How to replace the value of skin parameter on the fly in Richfaces 4.3?

孤者浪人 提交于 2019-12-10 11:03:31

问题


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?


回答1:


Changing skin parameters on the fly is not supported.

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.



来源:https://stackoverflow.com/questions/20415690/how-to-replace-the-value-of-skin-parameter-on-the-fly-in-richfaces-4-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!