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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:23:19+00:00 2026-06-09T08:23:19+00:00

I would like my page to be user friendly as much as possible and

  • 0

I would like my page to be user friendly as much as possible and I have an idea but its a little bit harder in the way I want to solve it.

I’m using primefaces and I would like to have a selectOneMenu element which changes to just an outputText with the value of the selected variable in the selectOneMenu. Anyone have some nifty ideas?

  • 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-09T08:23:23+00:00Added an answer on June 9, 2026 at 8:23 am

    This can be done with ajax and partial rendering. Here is a sketch of my idea (untested and in plain JSF):

    <h:panelGroup id="wrapper">
      <h:selectOneMenu value="#{myBean.myValue}" 
                       rendered="#{myBean.myValue == someInitialValue}" ...>
         <f:ajax render="wrapper"/>
           ... (your select items here)
      </h:selectOneMenu>
      <h:outputText value="#{myBean.myValue}" 
                    rendered="#{myBean.myValue != someInitialValue}" .../>
    </h:panelGroup>
    

    And that’s what it does:

    The value of h:selectOneMenu will be initialized and the menu will be rendered only if it is the initial value.

    On change of the value, the surrounding panelgroup will be re-rendered, hides the menu and lets the h:outputText appear.

    You need a wrapping panelGroup for this because the outputText is not there at page load. If your form is small you could also render=@form or any other surrounding container instead. Then you wouldn’t need the wrapper.

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

Sidebar

Related Questions

I would like to have the page on user/sidebar on the right in the
I have a search page where I would like to stop the user entering
I would like to download a .CSV and redirect the user to another page.
i would like to have a page where i can change passwords. me should
I would like to create a Facebook app similar to this page https://www.facebook.com/carlorinosg/app_150206515038121 user
I would like to refresh a page after it got back into the focus.
I would like to change the page names of a ASP.NET site to make
I would like to .get a page and then use jquery to find elements
I would like two next boxes on a page, You can then copy/paste text
I would like to open a new aspx page when i click on a

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.