1 Reply Latest reply: May 13, 2013 2:11 AM by François Degrelle RSS

    ADF Managed Bean List Object override previously stored value.

    964155
      Hi All,

      we create employee readonly table , which contains one af:selectBooleanCheckbox as column
      the value changeListener of af:selectBooleanCheckbox sets true, we try to the store the value in ArrayList object in ManagedBean of (SessionScope).

      example:
      public class Employee
      {
           List <Boolean>CheckFlg=new ArrayList<Boolean>();
           
           public void checkBox_valueChanged(ValueChangeEvent valueChangeEvent)
      {
      flg =(Boolean)valueChangeEvent.getNewValue();
      if(flg)
      {
                CheckFlg.add(flg);
           }

      }
      Problem is when we select two checkboxes selected in table checkBox_valueChanged fired twice and previosly stored values are override. so we always conatins one value in List.
      how to avoid this overriding in mybean level code.

      our goal : Display no of Employees selected : 5(example)      

      Please help us to solve the problem.

      Thanks,
      kmr