Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error in radio button value reference not found  RSS feed

 
Omar Ali
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • 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.
 
Tim Holloway
Bartender
Posts: 18709
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!