Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.el.PropertyNotFoundException

 
Gynnad Paullussen
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

I made a template in the Web Pages/WEB-INF/templates/default.xhtml and that template had one <ui:insert name="content"> and also some links that will be active with the controllerBean. But when I click on the commandLink (for example: <h:commandLink value="Facturen" action="#{controllerBean.facturen}" styleClass="facturen"/>) I get this:


Stack Trace


controllerBean


default.xhtml


What did I wrong?
 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I havent worked much with JSF but these are the questions that would help you resolve the issue.
1) Where is the mapping for "controllerBean" that is used in your code.
2) Also make sure to check if package "Beans" also specified as your "controllerBean" is inside the package "Beans".

Regards,
amit
 
Gynnad Paullussen
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
amit punekar wrote:Hello,
I havent worked much with JSF but these are the questions that would help you resolve the issue.
1) Where is the mapping for "controllerBean" that is used in your code.
2) Also make sure to check if package "Beans" also specified as your "controllerBean" is inside the package "Beans".

Regards,
amit


The first one I doesn't understand, but my controllerBean is in the package bean.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have violated the Java Standard Naming convention by starting a class name with a lower-case character. The default mechanism used by JSF's annotation processor mandates that the classname must follow the standard, which means that the class name must be "ControllerBean", not "controllerBean". JSF will then instantiate the bean and catalog it under the object name "controllerBean" (starting with lower-case, as is the standard for class instances).

Incidentally, in the MVC paradigm, backing beans are NOT controllers. They are Models, although they may be lightly decorated with controller assists such as listeners. The actual Controller part of JSF is primarily located in the FacesServlet and the various tag implementations, and relatively little user-written Controller code is required.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic