• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Commandbutton not invoking method

 
Michael Bahr
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic