• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Commandbutton not invoking method

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Saloon Keeper
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic