Thanks very much. departurePersonnel.clear(); does the job. --- Mike Kienenberger <[EMAIL PROTECTED]> wrote:
> 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 <[EMAIL PROTECTED]> wrote: > > or just a > > > > 2007/5/25, Mike Kienenberger <[EMAIL PROTECTED]>: > > > On 5/25/07, Caroline Jen <[EMAIL PROTECTED]> > 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); > > > } > > > > > > ____________________________________________________________________________________Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7