How can I hide a h:ouputLink based on a boolean in the backing bean?
For disabling I’d to it like this:
<h:commandButton disabled="#{backing.property}" />
But how can I hide completely?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
With:
Sorry, my fault. You were searching for h:outputLink. Because both h:outputLink and h:commandButton derive from UIComponentBase, both derived classes have the method
isRendered()and you do not need to wrap the commandLink in some sort of panel.Update
myComponent will be “hidden” due to because it will not be rendered.
Not to render myComponent means that you need to do an update (e.g. with an ajax request) on an UIComponent surrounding myComponent, like this:
see for API Specification: JavaTM Platform, Enterprise Edition 6 API Specification