This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic faces-config.xml  RSS feed

 
Jacob Fenwick
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to dynamically change the faces-config.xml at runtime? Or is it possible to have multiple config files?
 
Dave Salter
Ranch Hand
Posts: 293
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Multiple config files are allowed. See here.

I'm sorry, I don't know about dynamic files.
 
Chris Schalk
author
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sergey Smirnov
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Chris Schalk
author
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!