* remove zk_component_id attribute usage
* refactoring - make zk_component_prefix a public constant
This commit is contained in:
parent
d73f9089a8
commit
7bbf2370b1
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue