IDEMPIERE-92 - Integrate Selenium. Prevent id space error caused by bad data.

This commit is contained in:
Heng Sin Low 2012-12-13 03:00:51 +08:00
parent 748ed726b4
commit 93387fff01
1 changed files with 4 additions and 2 deletions

View File

@ -43,7 +43,8 @@ public class Combobox extends org.zkoss.zul.Combobox implements IdSpace
public Comboitem appendItem(String label) public Comboitem appendItem(String label)
{ {
ComboItem item = new ComboItem(label); ComboItem item = new ComboItem(label);
item.setId(label); if (getFellowIfAny(label) == null )
item.setId(label);
item.setParent(this); item.setParent(this);
return item; return item;
} }
@ -64,7 +65,8 @@ public class Combobox extends org.zkoss.zul.Combobox implements IdSpace
public void appendItem(String name, Object value) { public void appendItem(String name, Object value) {
ComboItem item = new ComboItem(name, value); ComboItem item = new ComboItem(name, value);
item.setId(name); if (getFellowIfAny(name) == null)
item.setId(name);
this.appendChild(item); this.appendChild(item);
} }