开发者

Best practice, how to alter css file in JSF (Solved: How to access JSF 2.0 resources from Managed Bean)

开发者 https://www.devze.com 2023-02-06 19:19 出处:网络
I know how to access resources form view, but how can I access JSF resources from Managed Bean for example to edit css file ? Or I shouldn\'t try to do it at all, and think about another solution ?

I know how to access resources form view, but how can I access JSF resources from Managed Bean for example to edit css file ? Or I shouldn't try to do it at all, and think about another solution ?

Update: The idea was to alter css file by accessing it from Managed Bean @McDowell helped me with that and I'm relay grateful. But as he said it's not relay a good开发者_高级运维 idea. The goal is to give user ability to alter page style (colors, fonts, layout etc.). As I said earlier using style attribute would be hm.. annoying, my second idea is to write custom renderer and generate embedded style sheet but I'm beginner in java EE and JSF so I'm not sure if it is good idea, maybe there is other easier way?

0

精彩评论

暂无评论...
验证码 换一张
取 消