IDEMPIERE-92 fix problem opening Accounting Dimensions window on zk
This commit is contained in:
parent
d3d8114786
commit
2f95568b07
|
@ -46,7 +46,6 @@ public class AdempiereIdGenerator implements IdGenerator {
|
|||
}
|
||||
matcher.appendTail(sb);
|
||||
prefix = sb.toString();
|
||||
}
|
||||
if (prefix.startsWith("unq")) { // prefix already guaranteed unique
|
||||
if (desktop.getComponentByUuidIfAny(prefix) == null) { // but don't trust and look to avoid dups
|
||||
return prefix;
|
||||
|
@ -54,6 +53,7 @@ public class AdempiereIdGenerator implements IdGenerator {
|
|||
prefix = "not" + prefix; // set notunq as the prefix to let dev know something is wrong
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* add sequence suffix to guarantee uniqueness */
|
||||
int i = 0;
|
||||
|
|
|
@ -204,7 +204,7 @@ DataStatusListener, IADTabpanel, VetoableChangeListener
|
|||
layout.setParent(this);
|
||||
layout.setStyle("width: 100%; height: 100%; position: absolute;");
|
||||
|
||||
treePanel = new ADTreePanel();
|
||||
treePanel = new ADTreePanel(windowNo, gridTab.getTabNo());
|
||||
West west = new West();
|
||||
west.appendChild(treePanel);
|
||||
west.setWidth("300px");
|
||||
|
|
|
@ -37,17 +37,26 @@ public class ADTreePanel extends Panel implements EventListener
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 5473705529310157142L;
|
||||
private static final long serialVersionUID = -3046550099597437942L;
|
||||
private TreeSearchPanel pnlSearch;
|
||||
private Tree tree;
|
||||
|
||||
private Checkbox chkExpand; // Elaine 2009/02/27 - expand tree
|
||||
private int m_windowno = -1;
|
||||
private int m_tabno = -1;
|
||||
|
||||
public ADTreePanel()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
public ADTreePanel(int windowno, int tabno)
|
||||
{
|
||||
m_windowno = windowno;
|
||||
m_tabno = tabno;
|
||||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param AD_Tree_ID
|
||||
* @param windowNo
|
||||
|
@ -71,7 +80,7 @@ public class ADTreePanel extends Panel implements EventListener
|
|||
|
||||
tree.setStyle("border: none");
|
||||
|
||||
pnlSearch = new TreeSearchPanel(tree, Events.ON_SELECT);
|
||||
pnlSearch = new TreeSearchPanel(tree, Events.ON_SELECT, m_windowno, m_tabno);
|
||||
|
||||
Toolbar toolbar = new Toolbar();
|
||||
toolbar.appendChild(pnlSearch);
|
||||
|
|
|
@ -53,7 +53,7 @@ public class TreeSearchPanel extends Panel implements EventListener, TreeDataLis
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -1788127438140771622L;
|
||||
private static final long serialVersionUID = 3478451169922775667L;
|
||||
private TreeMap<String, Object> treeNodeItemMap = new TreeMap<String, Object>();
|
||||
private String[] treeValues;
|
||||
private String[] treeDescription;
|
||||
|
@ -64,6 +64,8 @@ public class TreeSearchPanel extends Panel implements EventListener, TreeDataLis
|
|||
private Tree tree;
|
||||
|
||||
private String eventToFire;
|
||||
private int m_windowno = 0;
|
||||
private int m_tabno = 0;
|
||||
|
||||
private static final String PREFIX_DOCUMENT_SEARCH = "/";
|
||||
|
||||
|
@ -87,6 +89,20 @@ public class TreeSearchPanel extends Panel implements EventListener, TreeDataLis
|
|||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tree
|
||||
* @param event
|
||||
*/
|
||||
public TreeSearchPanel(Tree tree, String event, int windowno, int tabno)
|
||||
{
|
||||
super();
|
||||
this.tree = tree;
|
||||
this.eventToFire = event;
|
||||
m_windowno = windowno;
|
||||
m_tabno = tabno;
|
||||
init();
|
||||
}
|
||||
|
||||
private void init()
|
||||
{
|
||||
Div div = new Div();
|
||||
|
@ -103,8 +119,7 @@ public class TreeSearchPanel extends Panel implements EventListener, TreeDataLis
|
|||
|
||||
cmbSearch = new AutoComplete();
|
||||
cmbSearch.setAutodrop(true);
|
||||
cmbSearch.setId("cmbSearch");
|
||||
cmbSearch.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, cmbSearch.getId());
|
||||
cmbSearch.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unqCmbSearch" + "_" + m_windowno + "_" + m_tabno);
|
||||
|
||||
cmbSearch.addEventListener(Events.ON_CHANGE, this);
|
||||
if (AEnv.isInternetExplorer())
|
||||
|
|
Loading…
Reference in New Issue