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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:36:41+00:00 2026-06-14T07:36:41+00:00

In my application I’m trying to set/update a SelectOneMenu if another SelectOneMenu is set.

  • 0

In my application I’m trying to set/update a SelectOneMenu if another SelectOneMenu is set. We’re using primefaces, so I checked the primefaces showcase and found exactly what I was looking for. Unfortunately it’s not working. The Event isn’t fired and I don’t know why. Hopefully you can help me

Link to the Example of the primefaces showcase

-> If the language is set, it should automatically reload the list with the salutations, but it doesn’t. I have to press F5 to reload. Any ideas?

My xhtml code

<h:form id="addressBasicsForm">
  <p:growl id="growl" sticky="true" showDetail="true"/>
  <p:tabView id="tabView">
    <p:tab id="stammdaten" title="#{msg.adr_basics_tabtitle}">
  <table style="width:100%;">
        <tr>
          <td style="width: 50%;">
    <p:panel toggleable="false">
      <table style="margin-top:3px; width:100%;">
        <tr style="height:26px;">
          <td>
            <p:selectOneMenu id="somLang" value="#AddressBasics_m.languageId}" style="margin-left:2px; width:90%;">
              <f:selectItems value="#{AddressBasics_m.languageItems}"/>
                      <p:ajax update="somAnrede" listener="#{AdressBasics_m.handleLanguageChange}"/>
            </p:selectOneMenu>
          </td>
        </tr>
        <tr style="height:26px;">
          <td>
            <p:selectOneMenu id="somAnrede" value="#AddressBasics_m.salutationId}" style="margin-left:2px; width:90%;">
              <f:selectItems value="#{AddressBasics_m.salutationItems}" />
            </p:selectOneMenu>
          </td>

My Bean

@Named("AddressBasics_m")
@ConversationScoped
public class AddressBasicsView implements Serializable{
private static final long serialVersionUID = -4034697810438325785L;

public List<SelectItem> getSalutationItems(){
    if(firstrun)
        languageId = 21L;

    firstrun = false;
    if(salutationItems == null || lastLanguageId != languageId){
        salutationItems = addressService.getAllSalutationsByLangId(languageId);
        setLastLanguageId(languageId);
    }
    return salutationItems;
}

public void handleLanguageChange(){
    this.salutationItems = getSalutationItems();
}
  • 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-14T07:36:43+00:00Added an answer on June 14, 2026 at 7:36 am

    I believe that the problem is on your Ajax call.
    Ajax could be very tricky, I would recommend 2 different approachs:

    <p:ajax render="@form" listener="#{AdressBasics_m.handleLanguageChange}"/>
    

    or

    <p:ajax update=":addressBasicsForm:tabView:stammdaten:somAnrede" listener="#{AdressBasics_m.handleLanguageChange}"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Application[temp] = 8; should set the value 8 to the key temp . However,
Application launch through Java web start(JWS) checks for update when we are launching it.
Application View: @model Models.ApplicationModel @using (Html.BeginForm()) { @Html.HiddenFor(m => m.SectionID); @Html.HiddenFor(m => m.CurrentSectionName); <div
Application use NHibernate. I Have object A that contains set of objects B. I
Application db connection in web service. i haveto connect the db using that web
Application was built using MS interop, to export .xls to infoPath and vice versa.
Application crashes on trying to access [tableView cellForRowAtIndexPath:indexPath] in the heightForRowAtIndexPath delegate method. -
Application pool for my web service has Identity set to myDomain\myUser. When I run
Application: SAS Enterprise Guide 4.3 / Operating System: Windows XP I am trying to
Application is sending email by using MFMailComposeViewController , everything works just fine. However after

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.