Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javax.el.PropertyNotFoundException: Property 'foo' not readable on type java.lang.Boolean

The is prefix is for boolean only, not for Boolean.

You have 2 options:

  1. Use boolean instead of Boolean.

  2. Or, rename method isPrimary() to getPrimary().

As to JAXB blunder of autogenerating the wrong method, you need to upgrade to at least JAXB 2.1.13 or to add -B-enableIntrospection to the wsimport call as per this JAXB documentation.

See also:

  • JavaBeans specification - Chapter 8.3.2
  • How does Java expression language resolve boolean attributes? (in JSF 1.2)
  • JSF 2 checkboxes and boolean getters

You can use a call directly to method score.isPrimary() like this:

<c:forEach var="score" items="${scores}">
<input type="checkbox"
       value="${score.isPrimary()}"
       name="someName"
       class="textField"/>
</c:forEach>