From 7bbf2370b127ee135e334e3837068319dec4ffa3 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 9 Jul 2010 18:32:11 +0800 Subject: [PATCH] * remove zk_component_id attribute usage * refactoring - make zk_component_prefix a public constant --- .../src/org/adempiere/webui/AdempiereIdGenerator.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/AdempiereIdGenerator.java b/zkwebui/WEB-INF/src/org/adempiere/webui/AdempiereIdGenerator.java index aeaf32a68b..158c39f057 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/AdempiereIdGenerator.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/AdempiereIdGenerator.java @@ -21,12 +21,11 @@ import org.zkoss.zk.ui.sys.IdGenerator; public class AdempiereIdGenerator implements IdGenerator { + public static final String ZK_COMPONENT_PREFIX = "zk_component_prefix"; + @Override public String nextComponentUuid(Desktop desktop, Component comp) { - String id = (String) comp.getAttribute("zk_component_ID"); - if (id != null && id.length() > 0) - return id; - String prefix = (String) comp.getAttribute("zk_component_prefix"); + String prefix = (String) comp.getAttribute(ZK_COMPONENT_PREFIX); if (prefix == null || prefix.length() == 0) prefix = "zk_comp_"; int i = Integer.parseInt(desktop.getAttribute("Id_Num").toString());