IDEMPIERE-943 Menu Lookup not showing dup names / Peer review

This commit is contained in:
Carlos Ruiz 2013-05-28 20:42:32 -05:00
parent bc9148858c
commit 2a9162fec2
3 changed files with 40 additions and 39 deletions

View File

@ -36,7 +36,7 @@ public class AutoComplete extends Combobox
/** /**
* *
*/ */
private static final long serialVersionUID = 2642639623099513816L; private static final long serialVersionUID = -6440285742490532737L;
/** comboItems All menu labels */ /** comboItems All menu labels */
private String[] comboItems; private String[] comboItems;

View File

@ -41,11 +41,11 @@ import org.zkoss.zul.Treeitem;
* *
*/ */
public class MenuTreeSearchPanel extends TreeSearchPanel { public class MenuTreeSearchPanel extends TreeSearchPanel {
/** /**
* generated serial id *
*/ */
private static final long serialVersionUID = 8785295166415073971L; private static final long serialVersionUID = 3127547233019932429L;
protected Toolbarbutton newBtn; protected Toolbarbutton newBtn;
protected Toolbarbutton openBtn; protected Toolbarbutton openBtn;
protected boolean isNew = false; protected boolean isNew = false;
@ -225,29 +225,29 @@ public class MenuTreeSearchPanel extends TreeSearchPanel {
protected void orderArrays() protected void orderArrays()
{ {
String aux; String aux;
for (int i = 1; i < treeValues.length; i++) for (int i = 1; i < treeValues.length; i++)
{ {
for(int j = 0;j < treeValues.length-i;j++) for (int j = 0; j < treeValues.length-i; j++)
{ {
if(treeValues[j].compareTo(treeValues[j+1]) > 0) if (treeValues[j].compareTo(treeValues[j+1]) > 0)
{ {
aux = treeValues[j]; aux = treeValues[j];
treeValues[j] = treeValues[j+1]; treeValues[j] = treeValues[j+1];
treeValues[j+1]=aux; treeValues[j+1]=aux;
aux = treeDescription[j]; aux = treeDescription[j];
treeDescription[j] = treeDescription[j+1]; treeDescription[j] = treeDescription[j+1];
treeDescription[j+1]=aux; treeDescription[j+1]=aux;
aux = treeTypes[j]; aux = treeTypes[j];
treeTypes[j] = treeTypes[j+1]; treeTypes[j] = treeTypes[j+1];
treeTypes[j+1]=aux; treeTypes[j+1]=aux;
aux = treeImages[j]; aux = treeImages[j];
treeImages[j] = treeImages[j+1]; treeImages[j] = treeImages[j+1];
treeImages[j+1]=aux; treeImages[j+1]=aux;
} }
} }
} }
} }
} }

View File

@ -63,13 +63,14 @@ import org.zkoss.zul.impl.LabelImageElement;
*/ */
public class TreeSearchPanel extends Panel implements EventListener<Event>, TreeDataListener, IdSpace public class TreeSearchPanel extends Panel implements EventListener<Event>, TreeDataListener, IdSpace
{ {
private static final String ON_COMBO_SELECT_ECHO_EVENT = "onComboSelectEcho";
private static final String ON_POST_SELECT_TREEITEM_EVENT = "onPostSelectTreeitem";
protected static final String ON_POST_FIRE_TREE_EVENT = "onPostFireTreeEvent";
/** /**
* *
*/ */
private static final long serialVersionUID = 3478451169922775667L; private static final long serialVersionUID = -1659100374345282774L;
private static final String ON_COMBO_SELECT_ECHO_EVENT = "onComboSelectEcho";
private static final String ON_POST_SELECT_TREEITEM_EVENT = "onPostSelectTreeitem";
protected static final String ON_POST_FIRE_TREE_EVENT = "onPostFireTreeEvent";
protected TreeMap<String, Object> treeNodeItemMap = new TreeMap<String, Object>(); protected TreeMap<String, Object> treeNodeItemMap = new TreeMap<String, Object>();
protected String[] treeValues; protected String[] treeValues;
protected String[] treeTypes; protected String[] treeTypes;