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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:31:12+00:00 2026-05-31T08:31:12+00:00

Here is my checkbox. I am preparing a comma delimited string of component ids

  • 0

Here is my checkbox. I am preparing a comma delimited string of component ids in the listener. The problem here is the getter getUpdateComponentList() is being called before the listener is called. So the string is never updated.

<p:outputPanel>
<h:selectManyCheckbox value="#{form.colors}">
  <f:selectItems value="#{form.colorItems}"/>
  <p:ajax listener="#{form.testListener}" event="change" update="#{form.updateComponentList}"  />
</h:selectManyCheckbox>
</p:outputPanel>
  • 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-05-31T08:31:13+00:00Added an answer on May 31, 2026 at 8:31 am

    That’s expected behaviour. PrimeFaces (and standard JSF) does not re-evaluate the update (and render, oncomplete, etc) attributes on a per-request basis. They are evaluated on a per-view basis. RichFaces, for example, does it in its <a4j:ajax> and yields exactly the expected behaviour.

    For PrimeFaces, your best bet is to remove the update attribute and use RequestContext#addPartialUpdateTarget() or #addPartialUpdateTargets() in the action method instead.

    E.g.

    RequestContext.getCurrentInstance().addPartialUpdateTargets(updateComponentList);
    

    It takes a Collection<String> such as List<String> or Set<String>.

    By the way, that event="change" is unnecessary. Just use the component’s default event.


    Update for users of a newer PrimeFaces version who are reading this answer later on and can’t find the aforementioned methods which are indeed removed in a newer PrimeFaces version; use one of the two update() methods instead (one takes a String and other takes a Collection<String>).

    RequestContext.getCurrentInstance().update(updateComponentList);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the problem. I have a checkbox and when I select it an image
My program compiles and runs, but here is my problem. I have a checkbox
Here's my proposed (very simplified to illustrate the problem space) design for a C#
Here are the two code snippets that are part of my form //checkbox <input
Here is the loop I have so far foreach (CheckBox chk in gpbSchedule.Controls.OfType<CheckBox>()) {
Here's a little jQuery function that does what I want when a checkbox is
Here's my javascript: $(.more_info).hide(); $(.checkbox.has_info, .has_info).focus(function(){ $(this).parent().next().next().show(fast); }); $(.checkbox.has_info, .has_info).blur(function(){ $(this).parent().next().next().hide(fast); }); Note, that
Here is my scenario: I have an XML file where various attributes (TextBox, CheckBox
Here is the scenario... I have a a checkbox next to each field that
Having difficulty checking (checkbox) all nodes by a specific class here is what i

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.