开发者

JSF boolean output

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜