• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Dynamic faces-config.xml

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 293
Mac OS X Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Multiple config files are allowed. See here.

I'm sorry, I don't know about dynamic files.
 
author
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
I got this tall by not having enough crisco in my diet as a kid. This ad looks like it had plenty of shortening:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic