File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes JSF faces-config.xml overwrite Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF faces-config.xml overwrite" Watch "JSF faces-config.xml overwrite" New topic

JSF faces-config.xml overwrite

urvish shah

Joined: Jan 06, 2005
Posts: 5

Can we overwrite faces-config.xml runtime? What I mean is I have specified navigation rule for success or failure in faces-config., But I want to use different rule now without changing the config file can I do it?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63532

Moving to the Web App Frameworks forum.

[Asking smart questions] [About Bear] [Books by Bear]
Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
Probably you can't and you should'nt,
but you can achieve the similar functionality by using NavigationHandler class.
Use handleNavigation method to execute a navigation stated in faces-config.xml
Method's signature is:

handleNavigation(javax.faces.context.FacesContext context, java.lang.String fromAction, java.lang.String outcome)

- Varun
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Moving to our brand new JSF Forum...

GenRocket - Experts at Building Test Data
I agree. Here's the link:
subject: JSF faces-config.xml overwrite
It's not a secret anymore!