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?>

[1170 byte] By [listboxa] at [2007-11-27 8:41:59]
# 1
i put this coding inside prerender.And list will retrieve dynamically.plz help.
listboxa at 2007-7-12 20:41:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
the output i want seem like this:listbox1listbox2-- MichaelAnthony John--
listboxa at 2007-7-12 20:41:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...