This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Commandbutton not invoking method" Watch "Commandbutton not invoking method" New topic
Author

Commandbutton not invoking method

Michael Bahr
Greenhorn

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: 15961
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Commandbutton not invoking method
 
Similar Threads
Trouble updating primefaces component w/ajax
synchronization validation and display of dialog in a primeface JSF2.0 form
Google Chart inside a Primefaces p:dialog
SelectListener for DataTable populated with ActionListener - infact if the initial size = 0
Cant get my datatable to update [PRIMEFACES]