cancel
Showing results for 
Search instead for 
Did you mean: 

Extending faces-config-beans.xml with alfresco 1.3

ajshaw
Champ in-the-making
Champ in-the-making
Hello. Another question for anyone who can help.

Using 1.3, what is the correct method of overriding managed beans configuration? browsing the forums and wiki, i found two different sets of instructions.

1) Put the new configuration inside a META-INF folder and jar it all up, placing it in WEB-INF/lib of the alfresco app. This works fine for navigation rules, but my bean config is only picked up if i remove the bean definition from faces-config-beans.xml (i guess this is because of the first found wins scenario, for beans config, described in the packaging/distribution instructions in the wiki).

2) the second method, described in the packaging and distribution instructions on the wiki, says to put the beans config in a faces-config-custom.xml in WEB-INF, replacing the faces-config-custom.xml placeholder file. This placeholder file doesn't exist in the 1.3 distribution i downloaded, and if i create my own, the definitions are still not picked up, even if i remove the definitions from faces-config-beans.xml, as before. (No bean is found in the latter case and errors are thrown, as expected.)



Can anyone tell me if method 2 is indeed the correct one to use?
ANy ideas what i may be doing wrong?
2 REPLIES 2

gavinc
Champ in-the-making
Champ in-the-making
Hi,

Yes, method 2 is the correct way to do it. The changes described in the wiki were put into the product after the first preview distribution was released. The code to do this is in the SVN repo and will obviously be in the next 1.3 release.

If you don't want to get the source from SVN all you need to do is add "WEB-INF/faces-config-custom.xml" to the end of the list of faces config files to load in web.xml. Add it to the javax.faces.CONFIG_FILES context parameter.

Hope that helps.

ajshaw
Champ in-the-making
Champ in-the-making
Awesome. Thanks Gavin.