Added separate model selector ui definition
authorMartin Taal <martin.taal@openbravo.com>
Tue, 04 Jan 2011 22:49:21 +0100
changeset 9556 69677e10910d
parent 9555 6d769df0522d
child 9557 41e4ff5162c1
Added separate model selector ui definition
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/ForeignKeyUIDefinition.java
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/OBCLKER_UIDEFINITION.xml
modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/reference/ModelSelectorUIDefinition.java
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/ForeignKeyUIDefinition.java	Tue Jan 04 22:24:41 2011 +0100
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/ForeignKeyUIDefinition.java	Tue Jan 04 22:49:21 2011 +0100
@@ -59,6 +59,14 @@
         + ", foreignKeyField: true" + super.getGridFieldProperties(field);
   }
 
+  protected String getSuperGridFieldProperties(Field field) {
+    return super.getGridFieldProperties(field);
+  }
+
+  protected String getSuperGridFieldName(Field field) {
+    return super.getGridFieldName(field);
+  }
+
   protected String getGridFieldName(Field fld) {
     return super.getGridFieldName(fld) + "." + JsonConstants.IDENTIFIER;
   }
--- a/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/OBCLKER_UIDEFINITION.xml	Tue Jan 04 22:24:41 2011 +0100
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/OBCLKER_UIDEFINITION.xml	Tue Jan 04 22:49:21 2011 +0100
@@ -20,4 +20,14 @@
 <!--A99DF9E8D2CF4C3CB5EC139079E5DC8D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A99DF9E8D2CF4C3CB5EC139079E5DC8D--></OBCLKER_UIDEFINITION>
 
+<!--AC7D2F46DECC4623ABA4DDD88B9F68D2--><OBCLKER_UIDEFINITION>
+<!--AC7D2F46DECC4623ABA4DDD88B9F68D2-->  <OBCLKER_UIDEFINITION_ID><![CDATA[AC7D2F46DECC4623ABA4DDD88B9F68D2]]></OBCLKER_UIDEFINITION_ID>
+<!--AC7D2F46DECC4623ABA4DDD88B9F68D2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--AC7D2F46DECC4623ABA4DDD88B9F68D2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--AC7D2F46DECC4623ABA4DDD88B9F68D2-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
+<!--AC7D2F46DECC4623ABA4DDD88B9F68D2-->  <AD_REFERENCE_ID><![CDATA[95A596F08D1D45E1A36C84832920A6B3]]></AD_REFERENCE_ID>
+<!--AC7D2F46DECC4623ABA4DDD88B9F68D2-->  <CLASSNAME><![CDATA[org.openbravo.userinterface.selector.reference.ModelSelectorUIDefinition]]></CLASSNAME>
+<!--AC7D2F46DECC4623ABA4DDD88B9F68D2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--AC7D2F46DECC4623ABA4DDD88B9F68D2--></OBCLKER_UIDEFINITION>
+
 </data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/reference/ModelSelectorUIDefinition.java	Tue Jan 04 22:49:21 2011 +0100
@@ -0,0 +1,40 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SLU 
+ * All portions are Copyright (C) 2011 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.userinterface.selector.reference;
+
+import org.openbravo.model.ad.ui.Field;
+
+/**
+ * Implementation of the ui definition for the model selector.
+ * 
+ * @author mtaal
+ */
+public class ModelSelectorUIDefinition extends FKSelectorUIDefinition {
+
+  @Override
+  // overridden to let the model property show up in the grid
+  public String getGridFieldProperties(Field field) {
+    return getSuperGridFieldProperties(field);
+  }
+
+  protected String getGridFieldName(Field fld) {
+    return super.getSuperGridFieldName(fld);
+  }
+
+}