myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <mkien...@gmail.com>
Subject Re: JSF Table - How to Clean-up Previous Selections
Date Fri, 25 May 2007 19:41:18 GMT
Yes, that's probably a better strategy than what I suggested.  My
suggestion won't correctly clear out duplicate items that are already
selected.

On 5/25/07, Volker Weber <v.weber@inexso.de> wrote:
> or just a
>
> 2007/5/25, Mike Kienenberger <mkienenb@gmail.com>:
> > On 5/25/07, Caroline Jen <jiapei_jen@yahoo.com> wrote:
> >
> > >         public String updateDeparturePersonnel()
> > >         {
>
>   departurePersonnel.clear();
>
>
> at this point?
>
>
> > >         // iterate through the data rows ...
> > >         for ( int index = 0; index < personnel.size();
> > > index++ )
> > >         {
> > >                 PersonnelBean personnelBean = ( PersonnelBean
> > > )personnel.get( index );
> > >
> > >                     // If this row is selected, add all data
> > > fields the corresponding message
> > >                     if ( personnelBean.isSelectedPersonnel()
> > > )
> > >                     {
> > >                         departurePersonnel.add( personnelBean
> > > );
> > >                     }
> > >         }
> > >         return "success";
> > >         }
> >
> >
> > Is this what you're asking for?
> >
> > if ( personnelBean.isSelectedPersonnel() )
> > {
> >     departurePersonnel.add( personnelBean);
> > }
> > else
> > {
> >     departurePersonnel.remove( personnelBean);
> > }
> >
>

Mime
View raw message