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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:29:02+00:00 2026-06-14T22:29:02+00:00

The Primefaces p:selectOneMenu component does not seem to bring focus to a previously selected

  • 0

The Primefaces p:selectOneMenu component does not seem to bring focus to a previously selected item. For example, if I have a menu of countries set up as follows

    <p:selectOneMenu id="countryMenu" value="#{myBean.selectedCountry}">
        <f:selectItem value="#{null}" itemLabel="Please select a Country..."/>
        <f:selectItems value="#{myBean.countries}" var="country" 
                       itemValue="#{country.code}" 
                       itemLabel="#{country.name}"/>
        <p:ajax update="anotherComponent"/>
    </p:selectOneMenu>

and I select a country from the list, then click on the menu again it displays the list of countries from the beginning. It does retain the selected country – it just doesn’t scroll down and focus on it.

The standard JSF h:selectOneMenu displays the expected behaviour – it opens with the previously selected country visible.

Is there some trick to this or is this a bug?

It also has a number of other quirks with how it responds to keyboard input (pressing up/down when the menu has focus doesn’t open the menu, for example), which is a little frustrating.

I’m using:

  • Primefaces 3.1
  • Glassfish 3.1.1
  • NetBeans 7.1
  • 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-14T22:29:03+00:00Added an answer on June 14, 2026 at 10:29 pm

    Ok, this appears to have been fixed!

    I ran some tests with various versions of Primefaces with the following results:

    • 3.1 – didn’t work

    • 3.2 – didn’t work

    • 3.3 – didn’t work (previously selected value flickers briefly, then the first menu item is displayed)

    • 3.4 – works as expected

    Note: I did need to clear my browser cache (in Chrome and Firefox) when upgrading from 3.3 to 3.4 (the items weren’t selectable at all until I did this).

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

Sidebar

Related Questions

I am using Primefaces google map component. I have some markers and info windows
i have a problem with ajax update .From a SelectOneMenu component i want to
Possible Duplicate: primefaces selectOneMenu doesn’t working when it should my setPropertyActionListener is not setting
on primefaces 3.3 there is this component called carousel. their example shows that they
I am using JSF 2.0 and PrimeFaces. I have a selectOneMenu and a selectManyCheckbox.
I'm using Primefaces 3.3.1 and have a <p:selectOneMenu> where I'm selecting a new value.
I have a small piece of code that produce PrimeFaces dropdown List p:selectOneMenu ,
I have a problem are that when I try update a component that not
I have a Primefaces dataTable with rowEdit. Two columns contain a selectOneMenu control in
How can we get the selected value of PrimeFaces <p:selectOneMenu> using JavaScript/jQuery? I am

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.