Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8796459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:37:41+00:00 2026-06-13T23:37:41+00:00

How can I hide a h:ouputLink based on a boolean in the backing bean?

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:37:42+00:00Added an answer on June 13, 2026 at 11:37 pm

    With:

    <h:commandButton id="myComponent" rendered="#{backing.property}" />
    

    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.

    <h:outputLink rendered="#{backing.property}" />
    

    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:

    <h:panelGrid id="myPanelGrid">
      ....
      <h:outputLink id="myComponent" rendered="#{backing.property}" />
      ....
    <h:panelGrid>
    
    <h:commandButton value="show" action="#{backing.setPropertyToTrueMethod}" update="myPanelGrid" />
    

    see for API Specification: JavaTM Platform, Enterprise Edition 6 API Specification

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HTML: <div id=box>my box</div>​ How come I can hide a visible div like this:
I can hide the action bar in honeycomb using this code: getActionBar().hide(); But when
Can someone please tell me how I can hide this button after pressing it
I was trying to make this example here work, but unable hide submit button
I know that i can hide anything in codebehind, in selectionchanged event handler. But
By using frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); can hide window. but how could i display another window after
Is there a way in jQuery where I can hide an element, but not
I know that we can hide navigation bar back button. But I dont whant
This question has been thrown around without an answer. YES, we can hide the
I was wondering wether I can hide iAds once they are tapped. This way,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.