On 5/25/07, Caroline Jen <[EMAIL PROTECTED]> wrote:
public String updateDeparturePersonnel()
{
// 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);
}