[Logo]
Forums Register Login
Dynamic faces-config.xml
Is it possible to dynamically change the faces-config.xml at runtime? Or is it possible to have multiple config files?
Multiple config files are allowed. See here.

I'm sorry, I don't know about dynamic files.
I don't believe you can literally change the config file itself, but withing the JSF API you have the ability to change things programmatically.

-Chris
As best I know, JSF does not specify any public API to access to the config files even for read. So, there is no way to manipulate with it programmatically. However, you can do something that is defined in the config file using other API. For example:
* you have no way to add/delete or modify navigation rules
* you can register custom View Handler, validators, converters and so on

Actually, willing to have direct access to config file, especially to navigation rules is very common for people who have experience with Struts previously.

P.S. I speak about default implementation. JSF is very extendable framework. For example, you can create your own view handler and manage navigation based on your own configuration.
 

Originally posted by Sergey Smirnov:
As best I know, JSF does not specify any public API to access to the config files even for read. So, there is no way to manipulate with it programmatically. However, you can do something that is defined in the config file using other API. For example:
* you have no way to add/delete or modify navigation rules
* you can register custom View Handler, validators, converters and so on

Actually, willing to have direct access to config file, especially to navigation rules is very common for people who have experience with Struts previously.

P.S. I speak about default implementation. JSF is very extendable framework. For example, you can create your own view handler and manage navigation based on your own configuration.




That's what I meant. Not changing the file itself, but the elements within the app programmatically.

-Chris

This thread has been viewed 3143 times.

All times above are in ranch (not your local) time.
The current ranch time is
Nov 15, 2018 15:43:39.