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 4032980
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:47:23+00:00 2026-05-20T11:47:23+00:00

I use a SelectOneMenu component and a SelectBooleanCheckbox component on my JSF page. If

  • 0

I use a SelectOneMenu component and a SelectBooleanCheckbox component on my JSF page.

If the combo box is selected, my SelectOneMenu should be blocked and is set to the first element (reset).

Now I have value change listener for combobox implemented and blocking of the SelectOneMenu works very well.

But, when I reset the ComboBox, the SelectOneMenu is set to the old (previous) element.

I think there is something like cache used by JSF.

How do I reset the SelectOneMenu control?

I have linked the value-attribute to the bean property. I set a value for this attribute in the value change listener.

Thanks!

  • 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-05-20T11:47:23+00:00Added an answer on May 20, 2026 at 11:47 am

    I’ll assume that you’re using immediate="true" on the checkbox and that you’re calling FacesContext#renderResponse() in your value change listener method (otherwise you would go mad with validations).

    In that case, you need to set the value of the dropdown component itself to null as well.

    UIInput dropdown = (UIInput) facesContext.getViewRoot().findComponent("formid:dropdownid");
    dropdown.setValue(null);
    

    An alternative to UIViewroot#findComponent() is to bind it as bean property.

    <h:selectOneMenu binding="#{bean.dropdown}">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use hibernate to fill my jsf selectonemenu in ApplicationBean (in Liferay).
Use case: A does something on his box and gots stuck. He asks B
use this website a lot but first time posting. My program creates a number
I'm using JSF 2.0 and want to fill a selectOneMenu with the values of
USE master GO DECLARE @DbName nvarchar(MAX) SET @DbName = N'DataBase' ALTER DATABASE @DbName SET
I use Primefaces 3.1, JSF 2.1.6 on Glassfish 3.1.1. I have loads of commandbuttons
I want to fill an selectOneMenu with fields from my DataBase and then use
I have jsf page: .... <form jsfc=h:form action=> <h:dataTable value=#{newMusician.strings} var=preferredMusicGenre id=musicGenresSelectTable> <h:column> <h:inputText
I have got a problem with my JSF application. On a page there's a
i have a selectOneMenu with selectitems. if i use <f:selectItem itemValue=3 itemLabel=#{hrBundle['phoneType3']}/> it works

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.