list problem
i have a list of user in my database
Michael
Anthony
John
and my interface have two listboxes component.
below is my coding:
PropertyInfo pInfo = PropertyInfoDAO.loadPropertyInfoByORMID(this.getSessionBean1().getPropertyID());
User[] userList = UserDAO.listUserByQuery(null,null);
Option[] optUserIncharge = new Option [userList.length];
Option[] optUser = new Option [userList.length];
int y = 0;
for (int i=0; i<userList.length; i++){
//if (userList.inCharge.contains(pInfo)){
if (pInfo.chargeBy.contains(userList)){
optUserIncharge [y] = new Option (String.valueOf(userList.getORMID()),userList.getFirstName());
y++;
}
else {
optUser [y] = new Option (String.valueOf(userList.getORMID()),userList.getFirstName());
y++;
}
}
is my coding right?
here is what i want. when if user Michael is incharge property,
Michael is assign to listbox 1.And when test condition for Anthony and he is not incharge property, his name will assign to listbox 2. How to do that?>

