diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AutoComplete.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AutoComplete.java index 86963c2e3b..0446cb4d21 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AutoComplete.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AutoComplete.java @@ -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 */ private String[] comboItems; @@ -45,7 +45,7 @@ public class AutoComplete extends Combobox private String[] strDescription; private String[] images; - + private String[] contents; /** @@ -85,7 +85,7 @@ public class AutoComplete extends Combobox { contents = vals; } - + public void setImages(String[] images) { this.images = images; @@ -164,7 +164,7 @@ public class AutoComplete extends Combobox comboitem.setLabel(comboItems[i]); comboitem.setDescription(strDescription[i]); - + if (images != null && i < images.length && images[i] != null && images[i].trim().length() > 0) { comboitem.setImage(images[i]); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuTreeSearchPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuTreeSearchPanel.java index a85644a7be..98a52a54a6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuTreeSearchPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuTreeSearchPanel.java @@ -41,11 +41,11 @@ import org.zkoss.zul.Treeitem; * */ 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 openBtn; protected boolean isNew = false; @@ -187,13 +187,13 @@ public class MenuTreeSearchPanel extends TreeSearchPanel { imageList.add(mNode.getImagePath()); } } - + treeDescription = descriptionList.toArray(new String[0]); treeValues = valueList.toArray(new String[0]); treeImages = imageList.toArray(new String[0]); treeTypes = typeList.toArray(new String[0]); orderArrays(); - + cmbSearch.setDescription(treeDescription); cmbSearch.setDict(treeValues); cmbSearch.setImages(treeImages); @@ -221,33 +221,33 @@ public class MenuTreeSearchPanel extends TreeSearchPanel { Events.postEvent(event); Events.echoEvent(ON_POST_FIRE_TREE_EVENT, this, null); } - + protected void orderArrays() { String aux; - for (int i = 1; i < treeValues.length; i++) - { - for(int j = 0;j < treeValues.length-i;j++) - { - if(treeValues[j].compareTo(treeValues[j+1]) > 0) - { - aux = treeValues[j]; - treeValues[j] = treeValues[j+1]; - treeValues[j+1]=aux; - - aux = treeDescription[j]; - treeDescription[j] = treeDescription[j+1]; - treeDescription[j+1]=aux; - - aux = treeTypes[j]; - treeTypes[j] = treeTypes[j+1]; - treeTypes[j+1]=aux; - - aux = treeImages[j]; - treeImages[j] = treeImages[j+1]; - treeImages[j+1]=aux; - } - } + for (int i = 1; i < treeValues.length; i++) + { + for (int j = 0; j < treeValues.length-i; j++) + { + if (treeValues[j].compareTo(treeValues[j+1]) > 0) + { + aux = treeValues[j]; + treeValues[j] = treeValues[j+1]; + treeValues[j+1]=aux; + + aux = treeDescription[j]; + treeDescription[j] = treeDescription[j+1]; + treeDescription[j+1]=aux; + + aux = treeTypes[j]; + treeTypes[j] = treeTypes[j+1]; + treeTypes[j+1]=aux; + + aux = treeImages[j]; + treeImages[j] = treeImages[j+1]; + treeImages[j+1]=aux; + } + } } } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java index 745fb58b80..070f1bdde0 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java @@ -63,13 +63,14 @@ import org.zkoss.zul.impl.LabelImageElement; */ public class TreeSearchPanel extends Panel implements EventListener, 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 treeNodeItemMap = new TreeMap(); protected String[] treeValues; protected String[] treeTypes; @@ -178,7 +179,7 @@ public class TreeSearchPanel extends Panel implements EventListener, Tree protected void addTreeItem(Treeitem treeItem) { StringBuilder key = new StringBuilder(getLabel(treeItem)).append(".").append(treeItem.getAttribute("menu.type")); - treeNodeItemMap.put(key.toString(), treeItem); + treeNodeItemMap.put(key.toString(), treeItem); } protected void addTreeItem(DefaultTreeNode node) { @@ -356,7 +357,7 @@ public class TreeSearchPanel extends Panel implements EventListener, Tree if (comp.getUuid().equals(uuid)) { Comboitem item = (Comboitem) comp; - String value = item.getLabel(); + String value = item.getLabel(); String type = item.getContent(); selectTreeitem(value+"."+type); }