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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:04:26+00:00 2026-05-23T07:04:26+00:00

I am trying a simple thing in Seam using rich faces. i am displaying

  • 0

I am trying a simple thing in Seam using rich faces. i am displaying a list of checkboxes from another source like Ldap (groups or roles) and I want to persist the checked ones to my own table for groups, which i call profiles.

now i am not good at this for Which I apologize in advance. I am using an action to load the profiles from the ldap in getLdapOrgs method it returns a List of NGBProfiles the ones checked should be transfered to chosenNgbs of the same action. chosenNgbs are also the same type of List. the action implements ValueChangeListener so I have a processValueChange method overriden which doesnt do much right now cos It never gets called at the right time.

What happens is this: I load the page and when i select a check box the page reloads itself. and the check is gone. and the save button is never called.. Nor the valuchangelistner??? the only method that does get called is the getChosenNgbs method. and the getLdapOrgs method ofourse loads the roles from the ldap correctly.

my action class looks like this:

public void processValueChange(ValueChangeEvent arg0)
        throws AbortProcessingException {
    // TODO Auto-generated method stub
    System.out.println("in alue chaneg listener");
     if (getChosenNgbs() != null) {
            System.out.println(getChosenNgbs().size());
        }

}

public void setChosenNgbs(List<NotifyingBodyProfile> chosenNgbs) {
    this.chosenNgbs = chosenNgbs;
    for(NotifyingBodyProfile chosenNgb : chosenNgbs){
        entityManager.persist(chosenNgb);           
    }
}




public List<NotifyingBodyProfile> getChosenNgbs() {
    return chosenNgbs;
}

public List<NotifyingBodyProfile> getLdapOrgs(){

//get data from ldap
}

public  List<NotifyingBodyProfile>  getchosenNgbsfromDB(){

    List<NotifyingBodyProfile> chosenNgbsList= entityManager.createQuery("from NotifyingBodyProfile").getResultList();

    return chosenNgbsList;


}

public void save(){
    System.out.print("size of chosen Ngbs on save" + this.chosenNgbs.size());
}   

the xhtml is pretty straight forward as well. (sorry for formatting, code block was somehow not working. previously it did work… but now its not. I am not able to)

h:selectManyCheckbox title=”Select which types of NGBs you want to see”
layout=”pageDirection” value=”#{ngbProfileAction.chosenNgbs}” id=”selectBoxContainer” >valueChangeListener=”#{ngbProfileAction.processValueChange}” >
label=”#ngbProfile.name}”/>

a:support event=”onclick” reRender=”selectBoxContainer”/>

/h:selectManyCheckbox>

h:commandButton value=”Save ” action=”#{ngbProfileAction.save}” />

  • 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-23T07:04:26+00:00Added an answer on May 23, 2026 at 7:04 am

    Have you tried to add ajaxSingle=”true” to a:support?

    Also with Checkboxes i usually use the “onchange” event

    HTH

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

Sidebar

Related Questions

I'm trying to do a simple thing; read an image from the internet, save
I am trying what I thought a simple thing: drawing lines of a list
I'm trying to do what I think is a simple thing under Linux. I
I'm trying to do a simple update. I've done this kind of thing thousands
Very simple thing I am trying to do in JS (assign the values of
I'm getting frustrated trying to do a simple thing - I want to invoke
There is a relatively simple thing I'm trying to achieve but I'm unsure how
I am trying to do a seemingly simple thing, but having trouble accomplishing it.
I am trying to do a fairly simple thing in my WPF application, or
I am trying to do simple thing: I just need to set some cells

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.