fixed bug 20641: Implemented password reference for proces parameters
authorAsier Lostalé <asier.lostale@openbravo.com>
Fri, 08 Jun 2012 11:29:00 +0200
changeset 16794 61fb6c14f182
parent 16793 b37708f3bc77
child 16795 25ca12e0813e
fixed bug 20641: Implemented password reference for proces parameters
src-db/database/sourcedata/AD_REFERENCE.xml
src-wad/src/org/openbravo/wad/controls/WADPassword.java
src-wad/src/org/openbravo/wad/controls/WADString.java
src-wad/src/org/openbravo/wad/controls/WADString.xml
--- a/src-db/database/sourcedata/AD_REFERENCE.xml	Fri Jun 08 10:55:44 2012 +0200
+++ b/src-db/database/sourcedata/AD_REFERENCE.xml	Fri Jun 08 11:29:00 2012 +0200
@@ -4191,7 +4191,7 @@
 <!--16EC6DF4A59747749FDF256B7FBBB058-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--16EC6DF4A59747749FDF256B7FBBB058-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
 <!--16EC6DF4A59747749FDF256B7FBBB058-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.EncryptedStringDomainType]]></MODEL_IMPL>
-<!--16EC6DF4A59747749FDF256B7FBBB058-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADString]]></WAD_IMPL>
+<!--16EC6DF4A59747749FDF256B7FBBB058-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADPassword]]></WAD_IMPL>
 <!--16EC6DF4A59747749FDF256B7FBBB058-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIString]]></UI_IMPL>
 <!--16EC6DF4A59747749FDF256B7FBBB058-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
 <!--16EC6DF4A59747749FDF256B7FBBB058--></AD_REFERENCE>
@@ -4968,7 +4968,7 @@
 <!--C5C21C28B39E4683A91779F16C112E40-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--C5C21C28B39E4683A91779F16C112E40-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
 <!--C5C21C28B39E4683A91779F16C112E40-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.HashedStringDomainType]]></MODEL_IMPL>
-<!--C5C21C28B39E4683A91779F16C112E40-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADString]]></WAD_IMPL>
+<!--C5C21C28B39E4683A91779F16C112E40-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADPassword]]></WAD_IMPL>
 <!--C5C21C28B39E4683A91779F16C112E40-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIString]]></UI_IMPL>
 <!--C5C21C28B39E4683A91779F16C112E40-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
 <!--C5C21C28B39E4683A91779F16C112E40--></AD_REFERENCE>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-wad/src/org/openbravo/wad/controls/WADPassword.java	Fri Jun 08 11:29:00 2012 +0200
@@ -0,0 +1,32 @@
+/*
+ *************************************************************************
+ * 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) 2012 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.wad.controls;
+
+/**
+ * Provides UI support for new 3.0 password reference fields. To be used within process parameter
+ * windows. It does not encrypt password when sending it to the process.
+ * 
+ * @author asier
+ * 
+ */
+public class WADPassword extends WADString {
+  public WADPassword() {
+    type = "password";
+  }
+}
--- a/src-wad/src/org/openbravo/wad/controls/WADString.java	Fri Jun 08 10:55:44 2012 +0200
+++ b/src-wad/src/org/openbravo/wad/controls/WADString.java	Fri Jun 08 11:29:00 2012 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2012 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -27,6 +27,7 @@
 
 public class WADString extends WADControl {
   private WADControl button;
+  protected String type = "text";
 
   public WADString() {
   }
@@ -94,6 +95,7 @@
     } else {
       xmlDocument = getReportEngine().readXmlTemplate("org/openbravo/wad/controls/WADString",
           discard).createXmlDocument();
+      xmlDocument.setParameter("type", type);
     }
 
     xmlDocument.setParameter("columnName", getData("ColumnName"));
--- a/src-wad/src/org/openbravo/wad/controls/WADString.xml	Fri Jun 08 10:55:44 2012 +0200
+++ b/src-wad/src/org/openbravo/wad/controls/WADString.xml	Fri Jun 08 11:29:00 2012 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2012 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -33,6 +33,7 @@
   <PARAMETER id="xx" name="required" attribute="required"/>
   <PARAMETER id="xx" name="requiredClass" attribute="class" replace="xx"/>
   <PARAMETER id="xx" name="callout" attribute="onchange" replace="xx();"/>
+  <PARAMETER id="xx" name="type" attribute="type" default="text"/>
   <PARAMETER id="xxmissingSpan" name="columnName" attribute="id" replace="xx"/>
   <PARAMETER id="xxmissingSpanText" name="columnName" attribute="id" replace="xx"/>