File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Commandbutton not invoking method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Commandbutton not invoking method" Watch "Commandbutton not invoking method" New topic

Commandbutton not invoking method

Michael Bahr

Joined: Mar 12, 2013
Posts: 1
Hey guys,

i'm kinda desperate with this problem:

We have a dialog with that the user should enter a comment.When i try to submit the comment, the bean-method is not invoked. Could you help me with this? Please keep in mind that im very new to jsf. We're using primefaces.

Here's the code of the xhtml

and the bean

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

Welcome to the JavaRanch, Michael!

I fixed your code tags. They were just close enough to working that they got boxed in tiny little boxes and most of the code couldn't be read.

I issue my standard disclaimer: JSF is Mode/View/Controller, but backing beans are not Controllers. In JSF the Controllers are almost always pre-supplied as part of JSF itself. You only have to develop the View templates and Models. So naming a backing bean "xxxxController" is improper.

The most common reasons for an action method not to fire is either because the name was mis-coded (or mis-capitalized), the code signature of the action method isn't valid (yours is, however), or that one or more of the form control values failed validation on submit.

The first 2 problems require inspection and comparison of your code definitions and references. The validation problems may be illuminated if you add an <h:messages/> element to your view template.

An IDE is no substitute for an Intelligent Developer.
It is sorta covered in the JavaRanch Style Guide.
subject: Commandbutton not invoking method
It's not a secret anymore!