File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Set managed property in faces-confg from .propoerties file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Set managed property in faces-confg from .propoerties file" Watch "Set managed property in faces-confg from .propoerties file" New topic
Author

Set managed property in faces-confg from .propoerties file

Richard Gray
Greenhorn

Joined: Aug 08, 2008
Posts: 13
Is it possible to set a managed property in a faces-config.xml from a .properties file like:

<managed-property>
<property-name>dbName</property-name>
<value>prop.getProperty("database.name")</value>
</managed-property>
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

No, you can't put Java code in faces-config. You can, however use EL. So as long as you have the bean in question mapped under a name in a context that the EL processor can use, you can do it. However, I don't know anything that's available off the shelf.

If you are using Spring and have added the Spring EL properties resolver to the faces-config, you can let Spring construct a bean based on those properties and inject it into JSF.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Set managed property in faces-confg from .propoerties file