views:

155

answers:

1
+1  Q: 

JSF boolean output

Hi, Is there a way in JSF to output some text based on a boolean? For example: h:outputText value="Black" rendered="#{bean.isBlack}"

The bean property is called isBlack not getIsBlack...I dont want to rename this.

Thanks, D

+2  A: 

The expression #{bean.black} should do it.

The Unified Expression Language can resolve properties using JavaBean conventions (see BeanELResolver). The UEL spec is currently maintained as part of the JSP spec.

McDowell