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

  • SEARCH
  • Home
  • 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 8960975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:46:49+00:00 2026-06-15T15:46:49+00:00

I just have a selectOneRadio and want to display (or not) a panel depending

  • 0

I just have a selectOneRadio and want to display (or not) a panel depending on the boolean value (basic reRender after an event with a4j).
My binding with the boolean is good, and the action confirms that the boolean value changes on clicking:

Here is my selectOneRadio :

<h:selectOneRadio  value="#{myController.myBoolean}">
    <a4j:support event="onclick" action="#{...}"  reRender="myPanel" />
        <f:selectItem itemLabel="Yes" itemValue="#{true}"/>
        <f:selectItem itemLabel="No" itemValue="#{false}"/>
</h:selectOneRadio> 

Why is the reRender not working after using the rendered attribute (no effect) :

<a4j:outputPanel id="myPanel"  rendered="#{myController.myBoolean}">...

whereas it works using style attribute, by changing the visibility :

<a4j:outputPanel id="myPanel"  style="#{myController.myBoolean ? 'visibility:visible;':'display:none;'}">...
  • Richfaces 3.3.3.Final
  • Same bug on every browsers
  • 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-15T15:46:51+00:00Added an answer on June 15, 2026 at 3:46 pm

    The problem can be explained as below.
    Initially your panel “myPanel” is not rendered because rendered attribute is set to false. Then now you change the rendered value to true by selecting the selectOneRadio component. Then you are going to reRender the “myPanel” by using reRender="myPanel" in your a4j:support tag.
    But unfortunately there is no “myPanel” to be reRendered because there is no such element in your page(because it is not rendered).

    You can overcome this issue by reRendering the parent of the “myPanel”. For an example if “myPanel” has a parent panel as below,

    <a4j:outputPanel id="parentPanel">
        <a4j:outputPanel id="myPanel"  rendered="#{myController.myBoolean}">
               .......
        </a4j:outputPanel>
    </a4j:outputPanel>
    

    Now reRender the parent as below

    <a4j:support event="onclick" action=#{...}"  reRender="parentPanel" />
    

    Note: When you change the visibility instead of rendered attribute, it works because although “myPanel” is hidden it is still available in your page.

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

Sidebar

Related Questions

I just have a basic question with xml. I want to know whether it
I just have a few questions about programmatically adding controls in aspx . After
I just have an XP machine, and i want to play around using CC.NET.
I just have them in the body of the page one after the other.
I just have a quick question about iterators. I currently want to remove items
JSF 2.0, Primefaces 3.1.1 I have two p:selectOneRadio components: <p:selectOneRadio id=radio1 value=#{inningBean.lastDeliveryType}> <f:selectItem itemLabel=Wide
I just have a problem with a ruby script I just want to change
I just have development experience in .Net and Windows... And now I really want
I just have some basic questions about the way shared preferences work with Android:
I have a selectOneRadio menu with some selectItem's in them. I want to show

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.