IDEMPIERE-92 - Integrate Selenium. Fixed a non-unique id issue.

This commit is contained in:
Heng Sin Low 2012-12-07 07:04:06 +08:00
parent b8dc2f16dc
commit f63d735da5
1 changed files with 5 additions and 1 deletions

View File

@ -360,7 +360,11 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
for (int i = 0; i < roleKNPairs.length; i++) for (int i = 0; i < roleKNPairs.length; i++)
{ {
ComboItem ci = new ComboItem(roleKNPairs[i].getName(), roleKNPairs[i].getID()); ComboItem ci = new ComboItem(roleKNPairs[i].getName(), roleKNPairs[i].getID());
ci.setId(ci.getLabel()); if (lstRole.getFellowIfAny(ci.getLabel()) != null) {
ci.setId(ci.getLabel()+"_"+i);
} else {
ci.setId(ci.getLabel());
}
lstRole.appendChild(ci); lstRole.appendChild(ci);
if (roleKNPairs[i].getID().equals(initDefault)) if (roleKNPairs[i].getID().equals(initDefault))
lstRole.setSelectedItem(ci); lstRole.setSelectedItem(ci);