如果在URL中显示参数,如何呈现组件

时间:2011-11-01 15:50:21

标签: jsf jsf-2

我有一个包含一些文字的div 如果参数显示在网址

中,我想显示它

与JSTL一样

<c:if ${param.loginError!=null}>

<div>

Wrong username/password

</div>

</c:if>

如何在JSF中做到这一点?

1 个答案:

答案 0 :(得分:3)

使用rendered属性。

<h:panelGroup layout="block" rendered="#{param.loginError != null}">
    Wrong username/password.
</h:panelGroup>

另见: