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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:56:37+00:00 2026-06-01T19:56:37+00:00

Some problematic bahaviour in my JSF2 project. I have a dropdown box h:selectOneMenu which

  • 0

Some problematic bahaviour in my JSF2 project.

I have a dropdown box h:selectOneMenu which trigers a refresh in a page onchange = "submit();" which in turn causes my h:dataTable to be populated with checkboxes h:selectBooleanCheckbox.

The problem is that I don’t get all the ValueChangeEvent events from checkboxes – I only get as many events as there were checkboxes in the initial dropdown selection. For example:

  • First case where I don’t change value of a dropdown:
    • Page is created and my initial dropdown selection produces 3 checkboxes, i.e. 3 rows in the table. I select all checkboxes.
    • After I press OK button, 3 setNodeState events are fired.
  • Second case, I do change value of a dropdown:
    • Page is created and my initial dropdown selection produces 3 checkboxes, i.e. 3 rows in the table.
    • Then I click on a dropdown and select something different. This causes the table to have 10 checkoboxes, since there are 10 MultiFileSelectMgmtBean.fileNames. I select all checkboxes.
    • After I press OK strange thing happens: only 3 setNodeState events are fired, not 10 as I would expect.

Here is xhtml code:

<tr>
<td>
    <h:selectOneMenu 
                             value               = "#{MultiFileSelectMgmtBean.selectedLocationId}" 
                             valueChangeListener = "#{MultiFileSelectMgmtBean.LocationChangeEvent}" 
                             onchange            = "submit();" 
                             styleClass          = "text" style="width: 250px;">
                <f:selectItems 
                             value = "#{MultiFileSelectMgmtBean.locationsListItems}"
                             var   = "location"
                             itemValue = "#{location}"
                             itemLabel = "#{location.label}"> 
                </f:selectItems>
            </h:selectOneMenu>
</td>
</tr>
<tr>
<td>
           <h:dataTable value="#{MultiFileSelectMgmtBean.fileNames}" var="filename">
                    <h:column>
                          <h:selectBooleanCheckbox  value               = "#{MultiFileSelectMgmtBean.fileMap[filename]}"
                                                    valueChangeListener = "#{MultiFileSelectMgmtBean.setNodeState}" 
                                                    title               = "#{filename}"
                                                    />
                          <h:outputText value="#{filename}" styleClass="text"/>
                    </h:column>
        </h:dataTable>          
</td>
</tr>
  • 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-01T19:56:40+00:00Added an answer on June 1, 2026 at 7:56 pm

    Problem was the backing bean consturctor. I was always initializing the dropdown box with first selection. Then the event would change it to some other selectin.

    Now I am saving the state of dropdown as a session var. When bean is created, it first checks if this state was saved, and if yes load it.

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

Sidebar

Related Questions

Some e-Marketing tools claim to choose which web page to display based on where
I have problematic deployment of my application on some client computer. I really need
I have a problematic situation with some quite advanced unit tests (using PowerMock for
I read that self closing tags were problematic for some browsers such as IE7
.Net's implementation of HTTP is ... problematic. Beyond some issues in compliance with HTTP/1.0,
I'm using a class that extends BytecodeScanningDetector to check for some problematic fields in
I'm seeing this issue . I have a relatively simple ASP.NET page with a
I am working with some (problematic and strange) css, and I am wondering what
I have some code that I had to write to replace a function that
I made some mini plugin which works with Youtube API. But something wrong with

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.