views:

53

answers:

1

I added and have been using the faces-config.xml in my Netbeans 6.9/JSF2.0 project due to annotations not working. Not sure what I'm doing wrong, but when I use annotations, my beans are completely inaccessible. Properties for the project show that it is indeed JSF 2.0 (and not 1.1).

A: 

Self-solved. Capitalization issue. With the annotations, the bean name (inside the xhtml) needs to have a leading lower case character, even though the class is capitalized. With the XML faces configuration file, it worked fine capitalized...

Brian Knoblauch
It also makes sense as per Sun Java naming conventions. Variable names needs to start with lowercase. You would also write in real Java code like `Bean bean = new Bean()` and not `Bean Bean = new Bean()` ;) If you really insist using capitalized bean instance names, then make use of `name` attribute of `@ManagedBean` annotation to override the default one.
BalusC