• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

It seems the code JSF 2.0 controls aren't updating backing beans

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a simple screen doing an inputText which is mapped to a managed bean in session scope. when the screen is displayed I see the "get" method called but when I enter the data the "set" method is never fired. I have written JSP 1.2 applications and I had a similar problem but that was fixed by adding the <a4j:form> tag into the xhtml. I tried adding <a4j:form> to the JSF 2.0 page and I git an error that A4J didn't have a tag for form. In addition the <f:verbatim> is also not working which leads me to think many of the "core" JSF tags are not working.

The project is built on JBoss 6.0 libraries with Richfaces 4.0. Any assistance is greatly appreciated. I am hoping I have just made a simple mistake.


With this backing bean:

 
Saloon Keeper
Posts: 28468
210
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
a4j:form is obsolete. Use the general-purpose "h:form" tag, instead.

You are correct. Any control that is not contained within a JSF form will not properly process. And, of course, even if it is contained in a form, if any component of that form fails validation when the form is submiitted, none of the controls on that form will update the backing bean.
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic