JSF error: /fstation/search.jspx(24,62) \'#{vManager.fStations}\' Property \'fStations\' not found on type vm.beans.VisitorManagertype
vManager is my ma
If a property name starts with two or more uppercased characters, then it will be assumed to be in exactly that case. The getter getFStations()
indicates a property name of FStations
, so you should then access it as such:
<h:dataTable value="#{vManager.FStations}" var="row">
This is specified in chapter 8.8 of the JavaBeans Specification:
8.8 Capitalization of inferred names.
...
Thus when we extract a property or event name from the middle of an existing Java name, we normally convert the first character to lower case. However to support the occasional use of all upper-case names, we check if the first two characters of the name are both upper case and if so leave it alone. So for example,
- “FooBah” becomes “fooBah”
- “Z” becomes “z”
- “URL” becomes “URL”
We provide a method Introspector.decapitalize which implements this conversion rule.
Note that the property name is definied/resolved based on getter method name, not on private field name.
Unrelated to the concrete problem, I however strongly recommend to not abbreviate property names like that. Your code is this way not self-documenting. Don't be lazy and write words full out:
<h:dataTable value="#{visitorManager.fireStations}" var="fireStation">
or maybe:
<h:dataTable value="#{visitor.fireStations}" var="fireStation">