• 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

Error in radio button value reference not found

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need your help in getting the value of the selected radio button. My jsp file has the below code:



Any my java bean has:


in the value of the radio button "{#user.a_request}", it is producing an error that the reference "user" is not found. So how to solve this issue.
 
Saloon Keeper
Posts: 27763
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
Well, if you coded "{#user.a_request}", that would be a problem, since it's supposed to be "#{user.a_request}".

More likely, however, it's your use of non-compliant property names and accessors.

In Java, the underscore is generally not encouraged, as the industry-accepted format for names is camelCase.

The real problem, however is how JavaBeans (and JSF backing beans ARE JavaBeans) expect their accessor methods to be named.

In other words, not "geta_request()" and "seta_request()", but "getA_request()" and "setA_request()".

The expected accessor method names are determined by camelCasing the property name, converting the first character of the property name to upper-case.

If you don't follow that standard. them JSF will not be able to find your accessor methods and it will silently fail.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic