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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:29:42+00:00 2026-06-17T18:29:42+00:00

Why after selecting an item in this code, the cities component does not get

  • 0

Why after selecting an item in this code, the cities component does not get rendered?

<h:form prependId="false">
<h:panelGrid columns="1">
<h:selectOneMenu value="#{enumBeanStatus.selectedRegion}">
<f:selectItems id="selectItem" value="#{enumBean.regions}" var="region" itemLabel="#{region.label}"/>
<f:ajax listener="#{enumBean.loadCities}" render="cities"/>
</h:selectOneMenu>
<h:outputText id="cities" value="#{enumBean.cities}"/>
</h:panelGrid>
</h:form>

It does send a POST with the selected Region, model gets updated correctly, but the <h:outputText> Component is not rendered.

One of the backing beans:

@Named
public class EnumBean {

private List<Region> regions;
private List<City> cities;

@Inject 
EnumBeanStatus enumBeanStatus; //This one is CDI @ApplicationScoped & @Named




// Code...

public void loadCities(){
setCities(City.getCitiesByRegion(enumBeanStatus.getSelectedRegion()));
}

// Getters and Setters
}
  • 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-17T18:29:43+00:00Added an answer on June 17, 2026 at 6:29 pm

    Remove prependId="false" from the <h:form>. It prevents <f:ajax> from resolving the right component based on a relative client ID.

    See also:

    • How to find out client ID of component for ajax update/render? Cannot find component with expression "foo" referenced from "bar"
    • UIForm with prependId="false" breaks <f:ajax render>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My dropDownList dropDown displayObject is stays visible after I am selecting an option. This
I have an issue in regards to my application, and not selecting an item
On selecting a item, the change event is not triggered. ASP Page: <asp:CheckBoxList ID=CheckBoxList1
I am selecting time slot on dragging on Exam time cell. After selecting time
I'm trying to present a modal view controller after selecting a contact and it
I have a list in a select. After selecting an option i do a
I have following requirement in my application. A tableView with games title After selecting
I'd like to have a Word 2007+ AddIn (in C#) which after selecting text
After incorporating what I’ve learned by reading the answers to this question , I've
I am unable to get the selected radio button value in a form post.

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.