boolean properties starting with "is" does not work
The is
prefix works only for boolean
, not Boolean
.
You've there apparently actually a Boolean
property.
You've 2 options to fix it:
- Rename the getter with
get
prefix. - Replace
Boolean
byboolean
. Note that it will default tofalse
instead ofnull
.
See also:
- JavaBeans specification - chapter 8.3.2
- How does Java expression language resolve boolean attributes? (in JSF 1.2)
Unrelated to the concrete problem, the classpath seems to be a mess as to EL implementation. The message Missing Resource in EL implementation: ???propertyNotReadable???
indicates that the EL impl wasn't able to find the associated error message in own JAR which should look like this
Property 'matriz' not found on type com.example.MyBean
Make sure that you don't have arbitrarily downloaded EL JAR files in /WEB-INF/lib
. Get rid of them. The servletcontainer already provides its own.
andolffer.joseph
Updated on June 05, 2022Comments
-
andolffer.joseph about 2 years
I have a project that use JSF 2.1 and PrimeFaces. I tried to use a simple
<h:outputText>
referencing#{myBean.matriz}
and I got this error:SEVERE: javax.el.PropertyNotFoundException: ... value="#{myBean.matriz}": Missing Resource in EL implementation: ???propertyNotReadable???
The getter is:
isMatriz()
. Should it begetMatriz()
? -
Nazar Annagurban over 11 yearsI tested with boolean primitive :D