开发者

JSF boolean output

开发者 https://www.devze.com 2022-12-10 05:52 出处:网络
Is there a way in JSF to output some text based on a boolean? For example: h:outputText value=\"Black\" rendered=\"#{bean.isBlack}\"

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消