简体   繁体   中英

How to render a component if a parameter is presented in the URL

i have a div that contains some text and i want to display it if a parameter is presented in the url

as in JSTL

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

<div>

Wrong username/password

</div>

</c:if>

how to do that in JSF ?

Use the rendered attribute.

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

See also:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM