hg merge release-6.1 (merge release6.1 into default)

This commit is contained in:
Carlos Ruiz 2018-12-15 17:30:10 +01:00
commit 610c11baa0
41 changed files with 425 additions and 85 deletions

View File

@ -0,0 +1,22 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-1052: Improve Performance using Search instead of Table/Table Direct
-- Jul 30, 2018 4:01:01 PM CEST
UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_DATE('2018-07-30 16:01:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200590
;
-- Jul 30, 2018 4:01:07 PM CEST
UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N',Updated=TO_DATE('2018-07-30 16:01:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200588
;
-- Jul 30, 2018 4:01:21 PM CEST
UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_DATE('2018-07-30 16:01:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200593
;
-- Jul 30, 2018 4:01:33 PM CEST
UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_DATE('2018-07-30 16:01:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200595
;
SELECT register_migration_script('201807301600_IDEMPIERE-1052.sql') FROM dual
;

View File

@ -0,0 +1,10 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3770: Translation : export only centralized data
-- Aug 2, 2018 3:36:33 PM CEST
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','Only centralized data',0,0,'Y',TO_DATE('2018-08-02 15:36:32','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2018-08-02 15:36:32','YYYY-MM-DD HH24:MI:SS'),0,200481,'OnlyCentralizedData','D','f43c0cce-0462-4247-baf6-e7da842152ab')
;
SELECT register_migration_script('201808021530_IDEMPIERE-3770.sql') FROM dual
;

View File

@ -0,0 +1,26 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3780 : AD_User.IsNoExpire to override MAX_INACTIVE_PERIOD_DAY
-- Aug 31, 2018 11:49:36 AM CEST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203266,0,0,'Y',TO_DATE('2018-08-31 11:49:36','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2018-08-31 11:49:36','YYYY-MM-DD HH24:MI:SS'),0,'IsNoExpire','No Expire','No Expire','D','86e9d8d5-35c5-4ba1-85d3-d674d8f48a2f')
;
-- Aug 31, 2018 11:50:17 AM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213690,0,'No Expire',114,'IsNoExpire','N',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_DATE('2018-08-31 11:50:17','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2018-08-31 11:50:17','YYYY-MM-DD HH24:MI:SS'),0,203266,'Y','N','D','N','N','N','Y','27a982d2-604b-4efe-982c-6e5004e62072','N',0,'N','Y','N')
;
-- Aug 31, 2018 11:50:19 AM CEST
ALTER TABLE AD_User ADD IsNoExpire CHAR(1) DEFAULT 'N' CHECK (IsNoExpire IN ('Y','N')) NOT NULL
;
-- Aug 31, 2018 11:50:38 AM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (205827,'No Expire',118,213690,'Y',1,440,'N','N','N','N',0,0,'Y',TO_DATE('2018-08-31 11:50:38','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2018-08-31 11:50:38','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','f96b4141-f3b9-45da-917f-23f9ddc80071','Y',3220,2,2)
;
-- Aug 31, 2018 11:51:05 AM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=420, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=2, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-08-31 11:51:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=205827
;
SELECT register_migration_script('201808311200_IDEMPIERE-3780.sql') FROM dual
;

View File

@ -0,0 +1,10 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3786 : Number of records in detail grid must not be hardcoded
-- Sep 11, 2018 4:29:18 PM CEST
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200143,0,0,TO_DATE('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),0,0,'Y','ZK_PAGING_DETAIL_SIZE','10','Default paging size for detail grid view in zk webui','D','C','e4555557-68a2-4b87-a605-4da79de87644')
;
SELECT register_migration_script('201809111630_IDEMPIERE-3786.sql') FROM dual
;

View File

@ -0,0 +1,11 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3780
-- Dec 15, 2018, 4:51:29 PM CET
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL, IsAdvancedField='Y',Updated=TO_DATE('2018-12-15 16:51:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205827
;
SELECT register_migration_script('201812151653_IDEMPIERE-3780.sql') FROM dual
;

View File

@ -0,0 +1,19 @@
-- IDEMPIERE-1052: Improve Performance using Search instead of Table/Table Direct
-- Jul 30, 2018 4:01:01 PM CEST
UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_TIMESTAMP('2018-07-30 16:01:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200590
;
-- Jul 30, 2018 4:01:07 PM CEST
UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N',Updated=TO_TIMESTAMP('2018-07-30 16:01:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200588
;
-- Jul 30, 2018 4:01:21 PM CEST
UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_TIMESTAMP('2018-07-30 16:01:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200593
;
-- Jul 30, 2018 4:01:33 PM CEST
UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_TIMESTAMP('2018-07-30 16:01:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200595
;
SELECT register_migration_script('201807301600_IDEMPIERE-1052.sql') FROM dual
;

View File

@ -0,0 +1,7 @@
-- IDEMPIERE-3770: Translation : export only centralized data
-- Aug 2, 2018 3:36:33 PM CEST
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','Only centralized data',0,0,'Y',TO_TIMESTAMP('2018-08-02 15:36:32','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2018-08-02 15:36:32','YYYY-MM-DD HH24:MI:SS'),0,200481,'OnlyCentralizedData','D','f43c0cce-0462-4247-baf6-e7da842152ab')
;
SELECT register_migration_script('201808021530_IDEMPIERE-3770.sql') FROM dual
;

View File

@ -0,0 +1,23 @@
-- IDEMPIERE-3780 : AD_User.IsNoExpire to override MAX_INACTIVE_PERIOD_DAY
-- Aug 31, 2018 11:49:36 AM CEST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203266,0,0,'Y',TO_TIMESTAMP('2018-08-31 11:49:36','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2018-08-31 11:49:36','YYYY-MM-DD HH24:MI:SS'),0,'IsNoExpire','No Expire','No Expire','D','86e9d8d5-35c5-4ba1-85d3-d674d8f48a2f')
;
-- Aug 31, 2018 11:50:17 AM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213690,0,'No Expire',114,'IsNoExpire','N',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2018-08-31 11:50:17','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2018-08-31 11:50:17','YYYY-MM-DD HH24:MI:SS'),0,203266,'Y','N','D','N','N','N','Y','27a982d2-604b-4efe-982c-6e5004e62072','N',0,'N','Y','N')
;
-- Aug 31, 2018 11:50:19 AM CEST
ALTER TABLE AD_User ADD COLUMN IsNoExpire CHAR(1) DEFAULT 'N' CHECK (IsNoExpire IN ('Y','N')) NOT NULL
;
-- Aug 31, 2018 11:50:38 AM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (205827,'No Expire',118,213690,'Y',1,440,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-08-31 11:50:38','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2018-08-31 11:50:38','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','f96b4141-f3b9-45da-917f-23f9ddc80071','Y',3220,2,2)
;
-- Aug 31, 2018 11:51:05 AM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=420, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=2, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-08-31 11:51:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=205827
;
SELECT register_migration_script('201808311200_IDEMPIERE-3780.sql') FROM dual
;

View File

@ -0,0 +1,7 @@
-- IDEMPIERE-3786 : Number of records in detail grid must not be hardcoded
-- Sep 11, 2018 4:29:18 PM CEST
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200143,0,0,TO_TIMESTAMP('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),0,0,'Y','ZK_PAGING_DETAIL_SIZE','10','Default paging size for detail grid view in zk webui','D','C','e4555557-68a2-4b87-a605-4da79de87644')
;
SELECT register_migration_script('201809111630_IDEMPIERE-3786.sql') FROM dual
;

View File

@ -0,0 +1,8 @@
-- IDEMPIERE-3780
-- Dec 15, 2018, 4:51:29 PM CET
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL, IsAdvancedField='Y',Updated=TO_TIMESTAMP('2018-12-15 16:51:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205827
;
SELECT register_migration_script('201812151653_IDEMPIERE-3780.sql') FROM dual
;

View File

@ -122,13 +122,13 @@ public class Core {
return null; return null;
} }
/** /**
* *
* @param processId Java class name or equinox extension id * @param processId Java class name or equinox extension id
* @return ProcessCall instance or null if processId not found * @return ProcessCall instance or null if processId not found
*/ */
public static ProcessCall getProcess(String processId) { public static ProcessCall getProcess(String processId) {
List<IProcessFactory> factories = Service.locator().list(IProcessFactory.class).getServices(); List<IProcessFactory> factories = getProcessFactories();
if (factories != null && !factories.isEmpty()) { if (factories != null && !factories.isEmpty()) {
for(IProcessFactory factory : factories) { for(IProcessFactory factory : factories) {
ProcessCall process = factory.newProcessInstance(processId); ProcessCall process = factory.newProcessInstance(processId);
@ -139,6 +139,39 @@ public class Core {
return null; return null;
} }
/**
* This method load the process factories waiting until the DefaultProcessFactory on base is loaded (IDEMPIERE-3829)
* @return List of factories implementing IProcessFactory
*/
private static List<IProcessFactory> getProcessFactories() {
List<IProcessFactory> factories = null;
int maxIterations = 5;
int waitMillis = 1000;
int iterations = 0;
boolean foundDefault = false;
while (true) {
factories = Service.locator().list(IProcessFactory.class).getServices();
if (factories != null && !factories.isEmpty()) {
for(IProcessFactory factory : factories) {
// wait until DefaultProcessFactory is loaded
if (factory instanceof DefaultProcessFactory) {
foundDefault = true;
break;
}
}
}
iterations++;
if (foundDefault || iterations >= maxIterations) {
break;
}
try {
Thread.sleep(waitMillis);
} catch (InterruptedException e) {
}
}
return factories;
}
/** /**
* *
* @param validatorId Java class name or equinox extension Id * @param validatorId Java class name or equinox extension Id

View File

@ -173,7 +173,7 @@ public class Translation implements IApplication
* @param Trl_Table translation table _Trl * @param Trl_Table translation table _Trl
* @return status message * @return status message
*/ */
public String exportTrl (String directory, int AD_Client_ID, String AD_Language, String Trl_Table) public String exportTrl (String directory, int AD_Client_ID, String AD_Language, String Trl_Table, boolean onlyCentralized)
{ {
String fileName = directory + File.separator + Trl_Table + "_" + AD_Language + ".xml"; String fileName = directory + File.separator + Trl_Table + "_" + AD_Language + ".xml";
log.info(fileName); log.info(fileName);
@ -185,6 +185,12 @@ public class Translation implements IApplication
String Base_Table = Trl_Table.substring(0, pos); String Base_Table = Trl_Table.substring(0, pos);
if (isBaseLanguage) if (isBaseLanguage)
tableName = Base_Table; tableName = Base_Table;
if (onlyCentralized) {
if (MTable.get(m_ctx, tableName).getAD_Table_ID() > MTable.MAX_OFFICIAL_ID)
return "";
}
String keyColumn = Base_Table + "_ID"; String keyColumn = Base_Table + "_ID";
String uuidColumn = MTable.getUUIDColumnName(Base_Table); String uuidColumn = MTable.getUUIDColumnName(Base_Table);
String[] trlColumns = getTrlColumns (Base_Table); String[] trlColumns = getTrlColumns (Base_Table);
@ -237,6 +243,10 @@ public class Translation implements IApplication
} }
if (AD_Client_ID >= 0) if (AD_Client_ID >= 0)
sql.append(haveWhere ? " AND " : " WHERE ").append("o.AD_Client_ID=").append(AD_Client_ID); sql.append(haveWhere ? " AND " : " WHERE ").append("o.AD_Client_ID=").append(AD_Client_ID);
if (onlyCentralized)
sql.append(haveWhere ? " AND " : " WHERE ").append(" o.").append(keyColumn).append("<=").append(MTable.MAX_OFFICIAL_ID).append(" AND o.IsActive = 'Y'");
sql.append(" ORDER BY t.").append(keyColumn); sql.append(" ORDER BY t.").append(keyColumn);
// //
pstmt = DB.prepareStatement(sql.toString(), null); pstmt = DB.prepareStatement(sql.toString(), null);
@ -500,7 +510,7 @@ public class Translation implements IApplication
System.out.println("Cannot create directory " + directory + " to export the language to it."); System.out.println("Cannot create directory " + directory + " to export the language to it.");
System.exit(1); System.exit(1);
} }
exportTrl(directory, -1, AD_Language, table); exportTrl(directory, -1, AD_Language, table, true);
} else } else
System.out.println("Just import and export are supported as modes."); System.out.println("Just import and export are supported as modes.");
} }

View File

@ -220,6 +220,7 @@ public class AttachmentFileSystem implements IAttachmentStore {
attach.m_items.add(entry); attach.m_items.add(entry);
} else { } else {
log.severe("file not found: " + file.getAbsolutePath()); log.severe("file not found: " + file.getAbsolutePath());
attach.m_items.add(new MAttachmentEntry("~" + file.getName() + "~", "".getBytes(), attach.m_items.size() + 1));
} }
} }

View File

@ -485,6 +485,15 @@ public interface I_AD_User
*/ */
public String getIsMenuAutoExpand(); public String getIsMenuAutoExpand();
/** Column name IsNoExpire */
public static final String COLUMNNAME_IsNoExpire = "IsNoExpire";
/** Set No Expire */
public void setIsNoExpire (boolean IsNoExpire);
/** Get No Expire */
public boolean isNoExpire();
/** Column name IsNoPasswordReset */ /** Column name IsNoPasswordReset */
public static final String COLUMNNAME_IsNoPasswordReset = "IsNoPasswordReset"; public static final String COLUMNNAME_IsNoPasswordReset = "IsNoPasswordReset";

View File

@ -1,18 +1,18 @@
package org.compiere.model; package org.compiere.model;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import org.compiere.util.Env; import org.compiere.util.Env;
public class MPasswordHistory extends X_AD_Password_History { public class MPasswordHistory extends X_AD_Password_History {
/** /**
* *
*/ */
private static final long serialVersionUID = 3480028808276906947L; private static final long serialVersionUID = 8602148028134601856L;
public MPasswordHistory(Properties ctx, int AD_Password_History_ID, public MPasswordHistory(Properties ctx, int AD_Password_History_ID,
String trxName) { String trxName) {
super(ctx, AD_Password_History_ID, trxName); super(ctx, AD_Password_History_ID, trxName);
@ -35,6 +35,9 @@ public class MPasswordHistory extends X_AD_Password_History {
* @return * @return
*/ */
public static List<MPasswordHistory> getPasswordHistoryForCheck (int daysReuse, int userId){ public static List<MPasswordHistory> getPasswordHistoryForCheck (int daysReuse, int userId){
if (daysReuse <= 0) {
return new ArrayList<MPasswordHistory>();
}
StringBuilder whereClause = new StringBuilder() StringBuilder whereClause = new StringBuilder()
.append("SYSDATE-") .append("SYSDATE-")
.append(daysReuse) .append(daysReuse)

View File

@ -59,7 +59,7 @@ public class MRefTable extends X_AD_Ref_Table
@Override @Override
public I_AD_Table getAD_Table() throws RuntimeException { public I_AD_Table getAD_Table() throws RuntimeException {
MTable table = MTable.get(getCtx(), getAD_Table_ID()); MTable table = MTable.get(getCtx(), getAD_Table_ID(), get_TrxName());
return table; return table;
} }

View File

@ -42,9 +42,9 @@ public class MSysConfig extends X_AD_SysConfig
/** /**
* *
*/ */
private static final long serialVersionUID = 8623809160538454497L; private static final long serialVersionUID = -1273442365045945366L;
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION"; public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS"; public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
public static final String ALLOCATION_DESCRIPTION = "ALLOCATION_DESCRIPTION"; public static final String ALLOCATION_DESCRIPTION = "ALLOCATION_DESCRIPTION";
public static final String ALLOW_APPLY_PAYMENT_TO_CREDITMEMO = "ALLOW_APPLY_PAYMENT_TO_CREDITMEMO"; public static final String ALLOW_APPLY_PAYMENT_TO_CREDITMEMO = "ALLOW_APPLY_PAYMENT_TO_CREDITMEMO";
@ -59,7 +59,7 @@ public class MSysConfig extends X_AD_SysConfig
public static final String APPLICATION_MAIN_VERSION = "APPLICATION_MAIN_VERSION"; public static final String APPLICATION_MAIN_VERSION = "APPLICATION_MAIN_VERSION";
public static final String APPLICATION_MAIN_VERSION_SHOWN = "APPLICATION_MAIN_VERSION_SHOWN"; public static final String APPLICATION_MAIN_VERSION_SHOWN = "APPLICATION_MAIN_VERSION_SHOWN";
public static final String APPLICATION_OS_INFO_SHOWN = "APPLICATION_OS_INFO_SHOWN"; public static final String APPLICATION_OS_INFO_SHOWN = "APPLICATION_OS_INFO_SHOWN";
public static final String APPLICATION_URL = "APPLICATION_URL"; public static final String APPLICATION_URL = "APPLICATION_URL";
public static final String ATTACH_EMBEDDED_2PACK = "ATTACH_EMBEDDED_2PACK"; public static final String ATTACH_EMBEDDED_2PACK = "ATTACH_EMBEDDED_2PACK";
public static final String AUTO_ASSIGN_ROLE_TO_CREATOR_USER = "AUTO_ASSIGN_ROLE_TO_CREATOR_USER"; public static final String AUTO_ASSIGN_ROLE_TO_CREATOR_USER = "AUTO_ASSIGN_ROLE_TO_CREATOR_USER";
public static final String AUTOMATIC_PACKIN_FOLDERS = "AUTOMATIC_PACKIN_FOLDERS"; public static final String AUTOMATIC_PACKIN_FOLDERS = "AUTOMATIC_PACKIN_FOLDERS";
@ -141,7 +141,7 @@ public class MSysConfig extends X_AD_SysConfig
public static final String SYSTEM_IN_MAINTENANCE_MODE = "SYSTEM_IN_MAINTENANCE_MODE"; public static final String SYSTEM_IN_MAINTENANCE_MODE = "SYSTEM_IN_MAINTENANCE_MODE";
public static final String SYSTEM_INSERT_CHANGELOG = "SYSTEM_INSERT_CHANGELOG"; public static final String SYSTEM_INSERT_CHANGELOG = "SYSTEM_INSERT_CHANGELOG";
public static final String SYSTEM_NATIVE_SEQUENCE = "SYSTEM_NATIVE_SEQUENCE"; public static final String SYSTEM_NATIVE_SEQUENCE = "SYSTEM_NATIVE_SEQUENCE";
public static final String TOP_MARGIN_PIXELS_FOR_HEADER = "TOP_MARGIN_PIXELS_FOR_HEADER"; public static final String TOP_MARGIN_PIXELS_FOR_HEADER = "TOP_MARGIN_PIXELS_FOR_HEADER";
public static final String TRACE_ALL_TRX_CONNECTION_GET = "TRACE_ALL_TRX_CONNECTION_GET"; public static final String TRACE_ALL_TRX_CONNECTION_GET = "TRACE_ALL_TRX_CONNECTION_GET";
public static final String TWOPACK_COMMIT_DDL = "2PACK_COMMIT_DDL"; public static final String TWOPACK_COMMIT_DDL = "2PACK_COMMIT_DDL";
public static final String TWOPACK_HANDLE_TRANSLATIONS = "2PACK_HANDLE_TRANSLATIONS"; public static final String TWOPACK_HANDLE_TRANSLATIONS = "2PACK_HANDLE_TRANSLATIONS";
@ -175,6 +175,7 @@ public class MSysConfig extends X_AD_SysConfig
public static final String ZK_LOGO_SMALL = "ZK_LOGO_SMALL"; public static final String ZK_LOGO_SMALL = "ZK_LOGO_SMALL";
public static final String ZK_MAX_UPLOAD_SIZE = "ZK_MAX_UPLOAD_SIZE"; public static final String ZK_MAX_UPLOAD_SIZE = "ZK_MAX_UPLOAD_SIZE";
public static final String ZK_MOBILE_PAGING_SIZE = "ZK_MOBILE_PAGING_SIZE"; public static final String ZK_MOBILE_PAGING_SIZE = "ZK_MOBILE_PAGING_SIZE";
public static final String ZK_PAGING_DETAIL_SIZE = "ZK_PAGING_DETAIL_SIZE";
public static final String ZK_PAGING_SIZE = "ZK_PAGING_SIZE"; public static final String ZK_PAGING_SIZE = "ZK_PAGING_SIZE";
public static final String ZK_REPORT_FORM_OUTPUT_TYPE = "ZK_REPORT_FORM_OUTPUT_TYPE"; public static final String ZK_REPORT_FORM_OUTPUT_TYPE = "ZK_REPORT_FORM_OUTPUT_TYPE";
public static final String ZK_REPORT_JASPER_OUTPUT_TYPE = "ZK_REPORT_JASPER_OUTPUT_TYPE"; public static final String ZK_REPORT_JASPER_OUTPUT_TYPE = "ZK_REPORT_JASPER_OUTPUT_TYPE";
@ -183,8 +184,8 @@ public class MSysConfig extends X_AD_SysConfig
public static final String ZK_ROOT_FOLDER_BROWSER = "ZK_ROOT_FOLDER_BROWSER"; public static final String ZK_ROOT_FOLDER_BROWSER = "ZK_ROOT_FOLDER_BROWSER";
public static final String ZK_SEQ_DEFAULT_VALUE_PANEL = "ZK_SEQ_DEFAULT_VALUE_PANEL"; public static final String ZK_SEQ_DEFAULT_VALUE_PANEL = "ZK_SEQ_DEFAULT_VALUE_PANEL";
public static final String ZK_SESSION_TIMEOUT_IN_SECONDS = "ZK_SESSION_TIMEOUT_IN_SECONDS"; public static final String ZK_SESSION_TIMEOUT_IN_SECONDS = "ZK_SESSION_TIMEOUT_IN_SECONDS";
public static final String ZK_THEME = "ZK_THEME";
public static final String ZK_THEME_USE_FONT_ICON_FOR_IMAGE = "ZK_THEME_USE_FONT_ICON_FOR_IMAGE"; public static final String ZK_THEME_USE_FONT_ICON_FOR_IMAGE = "ZK_THEME_USE_FONT_ICON_FOR_IMAGE";
public static final String ZK_THEME = "ZK_THEME";
public static final String ZOOM_ACROSS_QUERY_TIMEOUT = "ZOOM_ACROSS_QUERY_TIMEOUT"; public static final String ZOOM_ACROSS_QUERY_TIMEOUT = "ZOOM_ACROSS_QUERY_TIMEOUT";
/** /**

View File

@ -58,7 +58,7 @@ public class MTable extends X_AD_Table
/** /**
* *
*/ */
private static final long serialVersionUID = -8757836873040013402L; private static final long serialVersionUID = 7527235342324308477L;
public final static int MAX_OFFICIAL_ID = 999999; public final static int MAX_OFFICIAL_ID = 999999;
@ -102,7 +102,7 @@ public class MTable extends X_AD_Table
* @param tableName case insensitive table name * @param tableName case insensitive table name
* @return Table * @return Table
*/ */
public static MTable get (Properties ctx, String tableName) public static synchronized MTable get (Properties ctx, String tableName)
{ {
if (tableName == null) if (tableName == null)
return null; return null;

View File

@ -907,14 +907,6 @@ public class MUser extends X_AD_User
MPasswordRule pwdrule = MPasswordRule.getRules(getCtx(), get_TrxName()); MPasswordRule pwdrule = MPasswordRule.getRules(getCtx(), get_TrxName());
if (pwdrule != null){ if (pwdrule != null){
List<MPasswordHistory> passwordHistorys = MPasswordHistory.getPasswordHistoryForCheck(pwdrule.getDays_Reuse_Password(), this.getAD_User_ID()); List<MPasswordHistory> passwordHistorys = MPasswordHistory.getPasswordHistoryForCheck(pwdrule.getDays_Reuse_Password(), this.getAD_User_ID());
// for long time user don't use this system, because all password in history table is out of check range. but we will want new password must difference latest password
if (passwordHistorys.size() == 0 && !this.is_new() && this.get_ValueOld(MUser.COLUMNNAME_Password) != null){
Object oldSalt = this.get_ValueOld(MUser.COLUMNNAME_Salt);
Object oldPassword = this.get_ValueOld(MUser.COLUMNNAME_Password);
MPasswordHistory latestPassword = new MPasswordHistory(oldSalt == null?null:oldSalt.toString(), oldPassword == null?null:oldPassword.toString());
passwordHistorys.add(latestPassword);
}
pwdrule.validate((getLDAPUser() != null ? getLDAPUser() : getName()), getPassword(), passwordHistorys); pwdrule.validate((getLDAPUser() != null ? getLDAPUser() : getName()), getPassword(), passwordHistorys);
} }
setDatePasswordChanged(new Timestamp(new Date().getTime())); setDatePasswordChanged(new Timestamp(new Date().getTime()));
@ -1055,17 +1047,24 @@ public class MUser extends X_AD_User
@Override @Override
protected boolean afterSave(boolean newRecord, boolean success) { protected boolean afterSave(boolean newRecord, boolean success) {
if (getPassword() != null && getPassword().length() > 0 && (newRecord || is_ValueChanged("Password"))) { if (getPassword() != null && getPassword().length() > 0 && (newRecord || is_ValueChanged("Password"))) {
MPasswordHistory passwordHistory = new MPasswordHistory(this.getCtx(), 0, this.get_TrxName()); MPasswordRule pwdrule = MPasswordRule.getRules(getCtx(), get_TrxName());
passwordHistory.setSalt(this.getSalt()); if (pwdrule != null && pwdrule.getDays_Reuse_Password() > 0) {
passwordHistory.setPassword(this.getPassword()); boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false);
// http://wiki.idempiere.org/en/System_user if (! hash_password) {
if (!this.is_new() && this.getAD_User_ID() == 0){ log.severe("Saving password history: it is strongly encouraged to save password history just when using hashed passwords - WARNING! table AD_Password_History is possibly keeping plain passwords");
passwordHistory.set_Value(MPasswordHistory.COLUMNNAME_AD_User_ID, 0); }
}else{ MPasswordHistory passwordHistory = new MPasswordHistory(this.getCtx(), 0, this.get_TrxName());
passwordHistory.setAD_User_ID(this.getAD_User_ID()); passwordHistory.setSalt(this.getSalt());
passwordHistory.setPassword(this.getPassword());
// http://wiki.idempiere.org/en/System_user
if (!this.is_new() && this.getAD_User_ID() == 0){
passwordHistory.set_Value(MPasswordHistory.COLUMNNAME_AD_User_ID, 0);
}else{
passwordHistory.setAD_User_ID(this.getAD_User_ID());
}
passwordHistory.setDatePasswordChanged(this.getUpdated());
passwordHistory.saveEx();
} }
passwordHistory.setDatePasswordChanged(this.getUpdated());
passwordHistory.saveEx();
} }
return super.afterSave(newRecord, success); return super.afterSave(newRecord, success);
} }

View File

@ -31,7 +31,7 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
/** /**
* *
*/ */
private static final long serialVersionUID = 20181104L; private static final long serialVersionUID = 20180831L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_User (Properties ctx, int AD_User_ID, String trxName) public X_AD_User (Properties ctx, int AD_User_ID, String trxName)
@ -52,6 +52,8 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
// N // N
setIsLocked (false); setIsLocked (false);
// 'N' // 'N'
setIsNoExpire (false);
// N
setIsNoPasswordReset (false); setIsNoPasswordReset (false);
// 'N' // 'N'
setIsSalesLead (false); setIsSalesLead (false);
@ -747,6 +749,27 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
return (String)get_Value(COLUMNNAME_IsMenuAutoExpand); return (String)get_Value(COLUMNNAME_IsMenuAutoExpand);
} }
/** Set No Expire.
@param IsNoExpire No Expire */
public void setIsNoExpire (boolean IsNoExpire)
{
set_Value (COLUMNNAME_IsNoExpire, Boolean.valueOf(IsNoExpire));
}
/** Get No Expire.
@return No Expire */
public boolean isNoExpire ()
{
Object oo = get_Value(COLUMNNAME_IsNoExpire);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set No Password Reset. /** Set No Password Reset.
@param IsNoPasswordReset No Password Reset */ @param IsNoPasswordReset No Password Reset */
public void setIsNoPasswordReset (boolean IsNoPasswordReset) public void setIsNoPasswordReset (boolean IsNoPasswordReset)

View File

@ -1312,7 +1312,7 @@ public class Login
if (minutes > MAX_ACCOUNT_LOCK_MINUTES) if (minutes > MAX_ACCOUNT_LOCK_MINUTES)
{ {
boolean inactive = false; boolean inactive = false;
if (MAX_INACTIVE_PERIOD_DAY > 0 && user.getDateLastLogin() != null) if (MAX_INACTIVE_PERIOD_DAY > 0 && user.getDateLastLogin() != null && !user.isNoExpire())
{ {
long days = (now - user.getDateLastLogin().getTime()) / (1000 * 60 * 60 * 24); long days = (now - user.getDateLastLogin().getTime()) / (1000 * 60 * 60 * 24);
if (days > MAX_INACTIVE_PERIOD_DAY) if (days > MAX_INACTIVE_PERIOD_DAY)
@ -1331,7 +1331,7 @@ public class Login
} }
} }
if (MAX_INACTIVE_PERIOD_DAY > 0 && !user.isLocked() && user.getDateLastLogin() != null) if (MAX_INACTIVE_PERIOD_DAY > 0 && !user.isLocked() && user.getDateLastLogin() != null && !user.isNoExpire())
{ {
long days = (now - user.getDateLastLogin().getTime()) / (1000 * 60 * 60 * 24); long days = (now - user.getDateLastLogin().getTime()) / (1000 * 60 * 60 * 24);
if (days > MAX_INACTIVE_PERIOD_DAY) if (days > MAX_INACTIVE_PERIOD_DAY)

View File

@ -611,7 +611,7 @@ public class MWFNode extends X_AD_WF_Node
} }
if (getAD_Column_ID() > 0) { if (getAD_Column_ID() > 0) {
// validate that just advanced roles can manipulate secure content via workflows // validate that just advanced roles can manipulate secure content via workflows
MColumn column = MColumn.get(getCtx(), getAD_Column_ID()); MColumn column = MColumn.get(getCtx(), getAD_Column_ID(), get_TrxName ());
if (column.isSecure() || column.isAdvanced()) { if (column.isSecure() || column.isAdvanced()) {
if (! MRole.getDefault().isAccessAdvanced()) { if (! MRole.getDefault().isAccessAdvanced()) {
log.saveError("AccessTableNoUpdate", Msg.getElement(getCtx(), column.getColumnName())); log.saveError("AccessTableNoUpdate", Msg.getElement(getCtx(), column.getColumnName()));

View File

@ -11,6 +11,7 @@ import org.compiere.model.MTree;
import org.compiere.model.PO; import org.compiere.model.PO;
import org.compiere.model.POInfo; import org.compiere.model.POInfo;
import org.compiere.model.X_AD_Client; import org.compiere.model.X_AD_Client;
import org.compiere.model.X_AD_Image;
import org.compiere.model.X_AD_Org; import org.compiere.model.X_AD_Org;
import org.compiere.model.X_C_Location; import org.compiere.model.X_C_Location;
import org.compiere.model.X_M_Locator; import org.compiere.model.X_M_Locator;
@ -276,6 +277,8 @@ public class PoExporter {
addTableReference(columnName, X_M_Locator.Table_Name, new AttributesImpl()); addTableReference(columnName, X_M_Locator.Table_Name, new AttributesImpl());
} else if (DisplayType.Location == displayType) { } else if (DisplayType.Location == displayType) {
addTableReference(columnName, X_C_Location.Table_Name, new AttributesImpl()); addTableReference(columnName, X_C_Location.Table_Name, new AttributesImpl());
} else if (DisplayType.Image == displayType) {
addTableReference(columnName, X_AD_Image.Table_Name, new AttributesImpl());
} else { } else {
add(columnName, "", new AttributesImpl()); add(columnName, "", new AttributesImpl());
} }

View File

@ -20,13 +20,16 @@ echo ===================================
echo Starting iDempiere Server echo Starting iDempiere Server
echo =================================== echo ===================================
# if don't set from service get default value
TELNET_PORT=${TELNET_PORT:-12612}
VMOPTS="-Dorg.osgi.framework.bootdelegation=sun.security.ssl,org.w3c.dom.events VMOPTS="-Dorg.osgi.framework.bootdelegation=sun.security.ssl,org.w3c.dom.events
-Dosgi.compatibility.bootdelegation=true -Dosgi.compatibility.bootdelegation=true
-Djetty.home=$BASE/jettyhome -Djetty.home=$BASE/jettyhome
-Djetty.base=$BASE/jettyhome -Djetty.base=$BASE/jettyhome
-Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-alpn.xml,etc/jetty-http2.xml,etc/jetty-https.xml -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-alpn.xml,etc/jetty-http2.xml,etc/jetty-https.xml
-Dosgi.console=localhost:12612 -Dosgi.console=localhost:$TELNET_PORT
-Dmail.mime.encodefilename=true -Dmail.mime.encodefilename=true
-Dmail.mime.decodefilename=true -Dmail.mime.decodefilename=true
-Dmail.mime.encodeparameters=true -Dmail.mime.encodeparameters=true

View File

@ -1,5 +1,5 @@
-startup -startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar plugins/org.eclipse.equinox.launcher_1.5.100.v20180827-1352.jar
-install -install
setup setup
--launcher.XXMaxPermSize --launcher.XXMaxPermSize

View File

@ -29,8 +29,11 @@ echo -------------------------------------
echo Re-Create DataPump directory echo Re-Create DataPump directory
echo ------------------------------------- echo -------------------------------------
sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$IDEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateDataPumpDir.sql $IDEMPIERE_HOME/data sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$IDEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateDataPumpDir.sql $IDEMPIERE_HOME/data
# Note the user running this script must be member of dba group: usermod -G dba idempiere
chgrp dba $IDEMPIERE_HOME/data chgrp dba $IDEMPIERE_HOME/data
chmod 770 $IDEMPIERE_HOME/data chmod 770 $IDEMPIERE_HOME/data
chgrp dba $IDEMPIERE_HOME/data/ExpDat.dmp
chmod 640 $IDEMPIERE_HOME/data/ExpDat.dmp
echo ------------------------------------- echo -------------------------------------
echo Import ExpDat echo Import ExpDat

View File

@ -21,22 +21,30 @@ sqlplus $3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$IDEMPIER
chgrp dba $IDEMPIERE_HOME/data chgrp dba $IDEMPIERE_HOME/data
chmod 770 $IDEMPIERE_HOME/data chmod 770 $IDEMPIERE_HOME/data
sqlplus $3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME <<! if [ "x${1,,}" != "xreference" ]
then
sqlplus $3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME <<!
DROP USER REFERENCE CASCADE;
alter session set "_enable_rename_user"=true; alter session set "_enable_rename_user"=true;
alter system enable restricted session; alter system enable restricted session;
ALTER USER $1 RENAME TO REFERENCE IDENTIFIED BY "$2"; ALTER USER $1 RENAME TO REFERENCE IDENTIFIED BY "$2";
alter system disable restricted session; alter system disable restricted session;
! !
fi
rm -f $IDEMPIERE_HOME/data/Adempiere.dmp $IDEMPIERE_HOME/data/Adempiere.log
# Export # Export
expdp REFERENCE/$2@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME DIRECTORY=ADEMPIERE_DATA_PUMP_DIR DUMPFILE=Adempiere.dmp LOGFILE=Adempiere.log EXCLUDE=STATISTICS SCHEMAS=REFERENCE expdp REFERENCE/$2@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME DIRECTORY=ADEMPIERE_DATA_PUMP_DIR DUMPFILE=Adempiere.dmp LOGFILE=Adempiere.log EXCLUDE=STATISTICS SCHEMAS=REFERENCE
sqlplus $3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME <<! if [ "x${1,,}" != "xreference" ]
then
sqlplus $3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME <<!
alter session set "_enable_rename_user"=true; alter session set "_enable_rename_user"=true;
alter system enable restricted session; alter system enable restricted session;
ALTER USER REFERENCE RENAME TO $1 IDENTIFIED BY "$2"; ALTER USER REFERENCE RENAME TO $1 IDENTIFIED BY "$2";
alter system disable restricted session; alter system disable restricted session;
! !
fi
cd $IDEMPIERE_HOME/data cd $IDEMPIERE_HOME/data
jar cvfM Adempiere.jar Adempiere.dmp Adempiere.log jar cvfM Adempiere.jar Adempiere.dmp Adempiere.log

View File

@ -30,8 +30,13 @@ echo -------------------------------------
echo Re-Create DataPump directory echo Re-Create DataPump directory
echo ------------------------------------- echo -------------------------------------
sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$IDEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateDataPumpDir.sql $IDEMPIERE_HOME/data/seed sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$IDEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateDataPumpDir.sql $IDEMPIERE_HOME/data/seed
# Note the user running this script must be member of dba group: usermod -G dba idempiere
chgrp dba $IDEMPIERE_HOME/data
chmod 770 $IDEMPIERE_HOME/data
chgrp dba $IDEMPIERE_HOME/data/seed chgrp dba $IDEMPIERE_HOME/data/seed
chmod 770 $IDEMPIERE_HOME/data/seed chmod 770 $IDEMPIERE_HOME/data/seed
chgrp dba $IDEMPIERE_HOME/data/seed/Adempiere.dmp
chmod 640 $IDEMPIERE_HOME/data/seed/Adempiere.dmp
echo ------------------------------------- echo -------------------------------------
echo Import Adempiere.dmp echo Import Adempiere.dmp

View File

@ -39,11 +39,13 @@ esac
# adjust these variables to your environment # adjust these variables to your environment
IDEMPIERE_USER=idempiere IDEMPIERE_USER=idempiere
IDEMPIERE_HOME=/opt/idempiere-server IDEMPIERE_HOME=/opt/idempiere-server
JAVA_HOME=`ls -r /usr/lib/jvm/java-[6789]-openjdk*/bin/javac /usr/lib/jvm/java-[89]-oracle*/bin/javac | head -1` # in case you manual install java by use zip or your linux distros, or your java provider have difference pattern of path, please update here
JAVA_HOME=`ls -r /usr/lib/jvm/java-1[0-9]-openjdk*/bin/javac /usr/lib/jvm/java-1[0-9]-oracle*/bin/javac | head -1`
JAVA_HOME=`dirname $JAVA_HOME` JAVA_HOME=`dirname $JAVA_HOME`
JAVA_HOME=`dirname $JAVA_HOME` JAVA_HOME=`dirname $JAVA_HOME`
SU=su SU=su
export IDEMPIERE_HOME export IDEMPIERE_HOME
export TELNET_PORT=12612
if [ $(id -u) != "0" ] if [ $(id -u) != "0" ]
then then
@ -533,8 +535,8 @@ Enter postgres password:"
} }
getidempierestatus() { getidempierestatus() {
IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep) IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep ${IDEMPIERE_HOME} | grep -v grep)
echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application echo $IDEMPIERESTATUSSTRING | grep -q ${IDEMPIERE_HOME}
IDEMPIERESTATUS=$? IDEMPIERESTATUS=$?
} }
@ -571,7 +573,7 @@ start () {
echo -n "Starting iDempiere ERP: " echo -n "Starting iDempiere ERP: "
export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log
$SU ${IDEMPIERE_USER} -c "mkdir -p $IDEMPIERE_HOME/log" $SU ${IDEMPIERE_USER} -c "mkdir -p $IDEMPIERE_HOME/log"
$SU ${IDEMPIERE_USER} -c "cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" $SU ${IDEMPIERE_USER} -c "export TELNET_PORT=$TELNET_PORT;cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &"
RETVAL=$? RETVAL=$?
if [ $RETVAL -eq 0 ] ; then if [ $RETVAL -eq 0 ] ; then
# wait for server to be confirmed as started in logfile # wait for server to be confirmed as started in logfile
@ -620,20 +622,20 @@ stop () {
cd $IDEMPIERE_HOME/utils cd $IDEMPIERE_HOME/utils
# try shutdown from OSGi console, then direct kill with signal 15, then signal 9 # try shutdown from OSGi console, then direct kill with signal 15, then signal 9
log_warning_msg "Trying shutdown from OSGi console" log_warning_msg "Trying shutdown from OSGi console"
( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1 ( echo exit; echo y; sleep 5 ) | telnet localhost ${TELNET_PORT} > /dev/null 2>&1
getidempierestatus getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
log_success_msg "Service stopped with OSGi shutdown" log_success_msg "Service stopped with OSGi shutdown"
else else
log_warning_msg "Trying direct kill with signal -15" log_warning_msg "Trying direct kill with signal -15"
kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` kill -15 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5 sleep 5
getidempierestatus getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
log_success_msg "Service stopped with kill -15" log_success_msg "Service stopped with kill -15"
else else
log_warning_msg "Trying direct kill with signal -9" log_warning_msg "Trying direct kill with signal -9"
kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` kill -9 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5 sleep 5
getidempierestatus getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
@ -664,7 +666,7 @@ dostatus () {
if [ $IDEMPIERESTATUS -eq 0 ] ; then if [ $IDEMPIERESTATUS -eq 0 ] ; then
echo echo
echo "iDempiere is running:" echo "iDempiere is running:"
ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' ps ax | grep ${IDEMPIERE_HOME} | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
echo echo
else else
echo "iDempiere is stopped" echo "iDempiere is stopped"

View File

@ -20,6 +20,7 @@
# adjust these variables to your environment # adjust these variables to your environment
IDEMPIERE_HOME=/opt/idempiere-server IDEMPIERE_HOME=/opt/idempiere-server
IDEMPIEREUSER=idempiere IDEMPIEREUSER=idempiere
export TELNET_PORT=12612
# Instead of using ENVFILE you can set JAVA_HOME, IDEMPIERE_HOME and add JAVA_HOME/bin to PATH # Instead of using ENVFILE you can set JAVA_HOME, IDEMPIERE_HOME and add JAVA_HOME/bin to PATH
# in this case you can comment the source lines for ENVFILE below # in this case you can comment the source lines for ENVFILE below
# detected some problems with Hardy Heron ubuntu using the bash source command # detected some problems with Hardy Heron ubuntu using the bash source command
@ -32,8 +33,8 @@ IDEMPIERESTATUS=
MAXITERATIONS=60 MAXITERATIONS=60
getidempierestatus() { getidempierestatus() {
IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep) IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep ${IDEMPIERE_HOME} | grep -v grep)
echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application echo $IDEMPIERESTATUSSTRING | grep -q ${IDEMPIERE_HOME}
IDEMPIERESTATUS=$? IDEMPIERESTATUS=$?
} }
@ -48,7 +49,7 @@ start () {
. $ENVFILE . $ENVFILE
export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log
su $IDEMPIEREUSER -c "mkdir -p $IDEMPIERE_HOME/log" su $IDEMPIEREUSER -c "mkdir -p $IDEMPIERE_HOME/log"
su $IDEMPIEREUSER -c "cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" su $IDEMPIEREUSER -c "export TELNET_PORT=$TELNET_PORT;cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &"
RETVAL=$? RETVAL=$?
if [ $RETVAL -eq 0 ] ; then if [ $RETVAL -eq 0 ] ; then
# wait for server to be confirmed as started in logfile # wait for server to be confirmed as started in logfile
@ -90,20 +91,20 @@ stop () {
. $ENVFILE . $ENVFILE
# try shutdown from OSGi console, then direct kill with signal 15, then signal 9 # try shutdown from OSGi console, then direct kill with signal 15, then signal 9
log_warning_msg "Trying shutdown from OSGi console" log_warning_msg "Trying shutdown from OSGi console"
( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1 ( echo exit; echo y; sleep 5 ) | telnet localhost ${TELNET_PORT} > /dev/null 2>&1
getidempierestatus getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
log_success_msg "Service stopped with OSGi shutdown" log_success_msg "Service stopped with OSGi shutdown"
else else
log_warning_msg "Trying direct kill with signal -15" log_warning_msg "Trying direct kill with signal -15"
kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` kill -15 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5 sleep 5
getidempierestatus getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
log_success_msg "Service stopped with kill -15" log_success_msg "Service stopped with kill -15"
else else
log_warning_msg "Trying direct kill with signal -9" log_warning_msg "Trying direct kill with signal -9"
kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` kill -9 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5 sleep 5
getidempierestatus getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
@ -134,7 +135,7 @@ status () {
if [ $IDEMPIERESTATUS -eq 0 ] ; then if [ $IDEMPIERESTATUS -eq 0 ] ; then
echo echo
echo "iDempiere is running:" echo "iDempiere is running:"
ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' ps ax | grep ${IDEMPIERE_HOME} | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
echo echo
else else
echo "iDempiere is stopped" echo "iDempiere is stopped"

View File

@ -20,6 +20,7 @@
IDEMPIERE_HOME=/opt/idempiere-server IDEMPIERE_HOME=/opt/idempiere-server
ENVFILE=$IDEMPIERE_HOME/utils/myEnvironment.sh ENVFILE=$IDEMPIERE_HOME/utils/myEnvironment.sh
IDEMPIEREUSER=idempiere IDEMPIEREUSER=idempiere
export TELNET_PORT=12612
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
@ -28,8 +29,8 @@ IDEMPIERESTATUS=
MAXITERATIONS=60 # 2 seconds every iteration, max wait 2 minutes MAXITERATIONS=60 # 2 seconds every iteration, max wait 2 minutes
getidempierestatus() { getidempierestatus() {
IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep) IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep ${IDEMPIERE_HOME} | grep -v grep)
echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application echo $IDEMPIERESTATUSSTRING | grep -q ${IDEMPIERE_HOME}
IDEMPIERESTATUS=$? IDEMPIERESTATUS=$?
} }
@ -44,7 +45,7 @@ start () {
source $ENVFILE source $ENVFILE
export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log
su $IDEMPIEREUSER -c "mkdir -p $IDEMPIERE_HOME/log" su $IDEMPIEREUSER -c "mkdir -p $IDEMPIERE_HOME/log"
su $IDEMPIEREUSER -c "cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" su $IDEMPIEREUSER -c "export TELNET_PORT=$TELNET_PORT;cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &"
RETVAL=$? RETVAL=$?
if [ $RETVAL -eq 0 ] ; then if [ $RETVAL -eq 0 ] ; then
# wait for server to be confirmed as started in logfile # wait for server to be confirmed as started in logfile
@ -86,20 +87,20 @@ stop () {
source $ENVFILE source $ENVFILE
# try shutdown from OSGi console, then direct kill with signal 15, then signal 9 # try shutdown from OSGi console, then direct kill with signal 15, then signal 9
echo "Trying shutdown from OSGi console" echo "Trying shutdown from OSGi console"
( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1 ( echo exit; echo y; sleep 5 ) | telnet localhost ${TELNET_PORT} > /dev/null 2>&1
getidempierestatus getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
echo_success echo_success
else else
echo "Trying direct kill with signal -15" echo "Trying direct kill with signal -15"
kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` kill -15 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5 sleep 5
getidempierestatus getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
echo_success echo_success
else else
echo "Trying direct kill with signal -9" echo "Trying direct kill with signal -9"
kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` kill -9 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5 sleep 5
getidempierestatus getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
@ -131,7 +132,7 @@ status () {
if [ $IDEMPIERESTATUS -eq 0 ] ; then if [ $IDEMPIERESTATUS -eq 0 ] ; then
echo echo
echo "iDempiere is running:" echo "iDempiere is running:"
ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' ps ax | grep ${IDEMPIERE_HOME} | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
echo echo
else else
echo "iDempiere is stopped" echo "iDempiere is stopped"

View File

@ -19,6 +19,7 @@
# adjust these variables to your environment # adjust these variables to your environment
IDEMPIERE_HOME=/opt/idempiere-server IDEMPIERE_HOME=/opt/idempiere-server
IDEMPIEREUSER=idempiere IDEMPIEREUSER=idempiere
export TELNET_PORT=12612
# Instead of using ENVFILE you can set JAVA_HOME, IDEMPIERE_HOME and add JAVA_HOME/bin to PATH # Instead of using ENVFILE you can set JAVA_HOME, IDEMPIERE_HOME and add JAVA_HOME/bin to PATH
# in this case you can comment the source lines for ENVFILE below # in this case you can comment the source lines for ENVFILE below
# detected some problems with Hardy Heron ubuntu using the bash source command # detected some problems with Hardy Heron ubuntu using the bash source command
@ -57,8 +58,8 @@ IDEMPIERESTATUS=
MAXITERATIONS=60 MAXITERATIONS=60
getidempierestatus() { getidempierestatus() {
IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep) IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep ${IDEMPIERE_HOME} | grep -v grep)
echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application echo $IDEMPIERESTATUSSTRING | grep -q ${IDEMPIERE_HOME}
IDEMPIERESTATUS=$? IDEMPIERESTATUS=$?
} }
@ -74,7 +75,7 @@ start () {
. $ENVFILE . $ENVFILE
export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log
su $IDEMPIEREUSER -c "mkdir -p $IDEMPIERE_HOME/log" su $IDEMPIEREUSER -c "mkdir -p $IDEMPIERE_HOME/log"
su $IDEMPIEREUSER -c "cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" su $IDEMPIEREUSER -c "export TELNET_PORT=$TELNET_PORT;cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &"
RETVAL=$? RETVAL=$?
if [ $RETVAL -eq 0 ] ; then if [ $RETVAL -eq 0 ] ; then
# wait for server to be confirmed as started in logfile # wait for server to be confirmed as started in logfile
@ -117,20 +118,20 @@ stop () {
. $ENVFILE . $ENVFILE
# try shutdown from OSGi console, then direct kill with signal 15, then signal 9 # try shutdown from OSGi console, then direct kill with signal 15, then signal 9
log_warning_msg "Trying shutdown from OSGi console" log_warning_msg "Trying shutdown from OSGi console"
( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1 ( echo exit; echo y; sleep 5 ) | telnet localhost ${TELNET_PORT} > /dev/null 2>&1
getidempierestatus getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
echo "Service stopped with OSGi shutdown" echo "Service stopped with OSGi shutdown"
else else
echo "Trying direct kill with signal -15" echo "Trying direct kill with signal -15"
kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` kill -15 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5 sleep 5
getidempierestatus getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
echo "Service stopped with kill -15" echo "Service stopped with kill -15"
else else
echo "Trying direct kill with signal -9" echo "Trying direct kill with signal -9"
kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` kill -9 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5 sleep 5
getidempierestatus getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
@ -166,7 +167,7 @@ status () {
if [ $IDEMPIERESTATUS -eq 0 ] ; then if [ $IDEMPIERESTATUS -eq 0 ] ; then
echo echo
echo "iDempiere is running:" echo "iDempiere is running:"
ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' ps ax | grep ${IDEMPIERE_HOME} | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
echo echo
else else
echo "iDempiere is stopped" echo "iDempiere is stopped"

View File

@ -13,7 +13,7 @@ Author URI: http://www.bmlaurus.com
<link rel="stylesheet" href="<%=Prop.loadCss()%>"> <link rel="stylesheet" href="<%=Prop.loadCss()%>">
<script type="text/javascript" src="resources/jquery/jquery.js"></script> <script type="text/javascript" src="resources/jquery/jquery.js"></script>
<% if(Prop.isRssOn()){ <% if(Prop.isRssOn()){
out.write("<script type=\"text/javascript\" language=\"javascript\" src=\"http://www.google.com/jsapi?key=ABQIAAAAFEyVt-pBJaTXzM__EKlCrBRyn6VRRdQGMLQqRPPw1fs6QDtVcBRGklOHzrf7hmoAX3qgxg4t5ImqRA\"></script>\n"); out.write("<script type=\"text/javascript\" language=\"javascript\" src=\"https://www.google.com/jsapi?key=ABQIAAAAFEyVt-pBJaTXzM__EKlCrBRyn6VRRdQGMLQqRPPw1fs6QDtVcBRGklOHzrf7hmoAX3qgxg4t5ImqRA\"></script>\n");
out.write("<script type=\"text/javascript\" language=\"javascript\" src=\"resources/gfeedfetcher.js\"></script>"); out.write("<script type=\"text/javascript\" language=\"javascript\" src=\"resources/gfeedfetcher.js\"></script>");
} }
%> %>
@ -187,4 +187,4 @@ Author URI: http://www.bmlaurus.com
</div> </div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -36,6 +36,7 @@ import org.compiere.apps.ADialog;
import org.compiere.apps.StatusBar; import org.compiere.apps.StatusBar;
import org.compiere.apps.form.FormFrame; import org.compiere.apps.form.FormFrame;
import org.compiere.apps.form.FormPanel; import org.compiere.apps.form.FormPanel;
import org.compiere.grid.ed.VCheckBox;
import org.compiere.swing.CPanel; import org.compiere.swing.CPanel;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
import org.compiere.util.Env; import org.compiere.util.Env;
@ -80,6 +81,7 @@ public class VTranslationDialog extends TranslationController
private StatusBar statusBar = new StatusBar(); private StatusBar statusBar = new StatusBar();
private JLabel lClient = new JLabel(); private JLabel lClient = new JLabel();
private JComboBox<Object> cbClient = new JComboBox<Object>(); private JComboBox<Object> cbClient = new JComboBox<Object>();
private VCheckBox isOnlyCentralized = new VCheckBox();
/** /**
@ -93,6 +95,7 @@ public class VTranslationDialog extends TranslationController
lLanguage.setText(Msg.translate(Env.getCtx(), "AD_Language")); lLanguage.setText(Msg.translate(Env.getCtx(), "AD_Language"));
lLanguage.setToolTipText(Msg.translate(Env.getCtx(), "IsSystemLanguage")); lLanguage.setToolTipText(Msg.translate(Env.getCtx(), "IsSystemLanguage"));
lTable.setText(Msg.translate(Env.getCtx(), "AD_Table_ID")); lTable.setText(Msg.translate(Env.getCtx(), "AD_Table_ID"));
isOnlyCentralized.setText(Msg.getMsg(Env.getCtx(), "OnlyCentralizedData"));
// //
bExport.setText(Msg.getMsg(Env.getCtx(), "Export")); bExport.setText(Msg.getMsg(Env.getCtx(), "Export"));
bExport.addActionListener(this); bExport.addActionListener(this);
@ -107,9 +110,11 @@ public class VTranslationDialog extends TranslationController
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
panel.add(cbTable, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0 panel.add(cbTable, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
panel.add(bExport, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0 panel.add(isOnlyCentralized, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
panel.add(bExport, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
panel.add(bImport, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0 panel.add(bImport, new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
panel.add(lClient, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 panel.add(lClient, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
@ -224,7 +229,7 @@ public class VTranslationDialog extends TranslationController
AD_Table = (ValueNamePair)cbTable.getItemAt(i); AD_Table = (ValueNamePair)cbTable.getItemAt(i);
msg = imp msg = imp
? t.importTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue()) ? t.importTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue())
: t.exportTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue()); : t.exportTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue(), isOnlyCentralized.isSelected());
} }
if(msg == null || msg.length() == 0) if(msg == null || msg.length() == 0)
@ -237,7 +242,7 @@ public class VTranslationDialog extends TranslationController
msg = null; msg = null;
msg = imp msg = imp
? t.importTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue()) ? t.importTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue())
: t.exportTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue()); : t.exportTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue(), isOnlyCentralized.isSelected());
if(msg == null || msg.length() == 0) if(msg == null || msg.length() == 0)
msg = (imp ? "Import" : "Export") + " Successful. [" + directory + "]"; msg = (imp ? "Import" : "Export") + " Successful. [" + directory + "]";

View File

@ -615,6 +615,7 @@ public class WAcctViewer extends Window implements EventListener<Event>
private void dynInit (int AD_Table_ID, int Record_ID) private void dynInit (int AD_Table_ID, int Record_ID)
{ {
m_data.validateAcctSchemas(Record_ID);
m_data.fillAcctSchema(selAcctSchema ); m_data.fillAcctSchema(selAcctSchema );
selAcctSchema.addEventListener(Events.ON_SELECT, this); selAcctSchema.addEventListener(Events.ON_SELECT, this);

View File

@ -21,6 +21,8 @@
package org.adempiere.webui.acct; package org.adempiere.webui.acct;
import static org.compiere.model.SystemIDs.REFERENCE_POSTING_TYPE;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
@ -36,9 +38,9 @@ import org.adempiere.webui.component.Listbox;
import org.compiere.model.MAcctSchema; import org.compiere.model.MAcctSchema;
import org.compiere.model.MAcctSchemaElement; import org.compiere.model.MAcctSchemaElement;
import org.compiere.model.MFactAcct; import org.compiere.model.MFactAcct;
import org.compiere.model.MJournal;
import org.compiere.model.MLookupFactory; import org.compiere.model.MLookupFactory;
import org.compiere.model.MRefList; import org.compiere.model.MRefList;
import static org.compiere.model.SystemIDs.*;
import org.compiere.report.core.RColumn; import org.compiere.report.core.RColumn;
import org.compiere.report.core.RModel; import org.compiere.report.core.RModel;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
@ -179,6 +181,24 @@ public class WAcctViewerData
Env.clearWinContext(WindowNo); Env.clearWinContext(WindowNo);
} // dispose } // dispose
/**
* GL Journal only posts in one Accounting Schema
* if the record is a GL Journal, remove the others from the array
* @param Record_ID
*/
protected void validateAcctSchemas(int Record_ID)
{
if (Record_ID > 0 && AD_Table_ID == MJournal.Table_ID) {
MJournal journal = new MJournal(Env.getCtx(), Record_ID, null);
if (journal != null) {
ASchemas = new MAcctSchema[1];
ASchemas[0] = MAcctSchema.get(Env.getCtx(), journal.getC_AcctSchema_ID());
ASchema = ASchemas[0];
}
}
} // validateAcctSchemas
/************************************************************************** /**************************************************************************
* Fill Accounting Schema * Fill Accounting Schema
* @param cb Listbox to be filled * @param cb Listbox to be filled

View File

@ -78,7 +78,7 @@ public class GridView extends Vlayout implements EventListener<Event>, IdSpace,
/** /**
* *
*/ */
private static final long serialVersionUID = -2966799998482667434L; private static final long serialVersionUID = 3046157124327495333L;
private static final String HEADER_GRID_STYLE = "border: none; margin:0; padding: 0;"; private static final String HEADER_GRID_STYLE = "border: none; margin:0; padding: 0;";
@ -208,11 +208,16 @@ public class GridView extends Vlayout implements EventListener<Event>, IdSpace,
public void setDetailPaneMode(boolean detailPaneMode) { public void setDetailPaneMode(boolean detailPaneMode) {
if (this.detailPaneMode != detailPaneMode) { if (this.detailPaneMode != detailPaneMode) {
this.detailPaneMode = detailPaneMode; this.detailPaneMode = detailPaneMode;
pageSize = detailPaneMode ? DEFAULT_DETAIL_PAGE_SIZE : MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 20, Env.getAD_Client_ID(Env.getCtx())); pageSize = detailPaneMode ? getDetailPageSize() : MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 20, Env.getAD_Client_ID(Env.getCtx()));
updatePaging(); updatePaging();
} }
} }
/** Returns the number of records to be displayed in detail grid (TODO : manage exceptions defined in SysConfig - see https://idempiere.atlassian.net/browse/IDEMPIERE-3786) */
int getDetailPageSize() {
return MSysConfig.getIntValue(MSysConfig.ZK_PAGING_DETAIL_SIZE, DEFAULT_DETAIL_PAGE_SIZE, Env.getAD_Client_ID(Env.getCtx()));
}
public boolean isDetailPaneMode() { public boolean isDetailPaneMode() {
return this.detailPaneMode; return this.detailPaneMode;
} }

View File

@ -14,6 +14,7 @@
package org.adempiere.webui.apps.form; package org.adempiere.webui.apps.form;
import java.util.ArrayList;
import java.util.logging.Level; import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException; import org.adempiere.exceptions.AdempiereException;
@ -37,6 +38,8 @@ import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.FDialog;
import org.compiere.model.MLookup; import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory; import org.compiere.model.MLookupFactory;
import org.compiere.model.MPasswordHistory;
import org.compiere.model.MPasswordRule;
import org.compiere.model.MSysConfig; import org.compiere.model.MSysConfig;
import org.compiere.model.MUser; import org.compiere.model.MUser;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
@ -44,8 +47,10 @@ import org.compiere.util.DisplayType;
import org.compiere.util.Env; import org.compiere.util.Env;
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.compiere.util.Util; import org.compiere.util.Util;
import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zul.Columns; import org.zkoss.zul.Columns;
@ -140,12 +145,14 @@ public class WResetPassword implements IFormController, EventListener<Event>, Va
txtNewPassword.setId("txtNewPassword"); txtNewPassword.setId("txtNewPassword");
txtNewPassword.setType("password"); txtNewPassword.setType("password");
txtNewPassword.setCols(25); txtNewPassword.setCols(25);
txtNewPassword.addEventListener(Events.ON_BLUR, this);
ZKUpdateUtil.setWidth(txtNewPassword, "220px"); ZKUpdateUtil.setWidth(txtNewPassword, "220px");
txtRetypeNewPassword = new Textbox(); txtRetypeNewPassword = new Textbox();
txtRetypeNewPassword.setId("txtRetypeNewPassword"); txtRetypeNewPassword.setId("txtRetypeNewPassword");
txtRetypeNewPassword.setType("password"); txtRetypeNewPassword.setType("password");
txtRetypeNewPassword.setCols(25); txtRetypeNewPassword.setCols(25);
txtRetypeNewPassword.addEventListener(Events.ON_BLUR, this);
ZKUpdateUtil.setWidth(txtRetypeNewPassword, "220px"); ZKUpdateUtil.setWidth(txtRetypeNewPassword, "220px");
cbForceChangeNextLogin = new Checkbox(); cbForceChangeNextLogin = new Checkbox();
@ -261,6 +268,29 @@ public class WResetPassword implements IFormController, EventListener<Event>, Va
{ {
validateChangePassword(); validateChangePassword();
} }
else if (e.getTarget() == txtNewPassword) {
MPasswordRule pwdrule = MPasswordRule.getRules(Env.getCtx(), null);
String userName = "";
int userID = -1;
if (fUser.getValue() != null) {
userID = Integer.parseInt(fUser.getValue().toString());
}
if (userID < 0)
throw new WrongValueException(fUser.getComponent(), Msg.getMsg(Env.getCtx(), "UserMandatory"));
userName = MUser.getNameOfUser(userID);
if (pwdrule != null) {
try {
pwdrule.validate(userName, txtNewPassword.getValue(), new ArrayList<MPasswordHistory>());
}
catch (Exception ex) {
throw new WrongValueException(txtNewPassword, ex.getMessage());
}
}
}
else if (e.getTarget() == txtRetypeNewPassword) {
if (!txtNewPassword.getValue().equals(txtRetypeNewPassword.getValue()))
throw new WrongValueException(txtRetypeNewPassword, Msg.getMsg(Env.getCtx(), "PasswordNotMatch"));
}
} }
private void validateChangePassword() private void validateChangePassword()

View File

@ -588,7 +588,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
boolean isMandatory = !m_lookup && infoColumn.isMandatory() && infoColumn.isQueryCriteria(); boolean isMandatory = !m_lookup && infoColumn.isMandatory() && infoColumn.isQueryCriteria();
GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, AEnv.getADWindowID(p_WindowNo), infoWindow.getAD_InfoWindow_ID(), 0, GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, AEnv.getADWindowID(p_WindowNo), infoWindow.getAD_InfoWindow_ID(), 0,
columnName, infoColumn.get_Translation("Name"), infoColumn.getAD_Reference_ID(), columnName, infoColumn.get_Translation("Name"), infoColumn.getAD_Reference_ID(),
infoColumn.getAD_Reference_Value_ID(), isMandatory, false, infoColumn.getPlaceholder()); infoColumn.getAD_Reference_Value_ID(), isMandatory, false, infoColumn.get_Translation("Placeholder"));
if (infoColumn.getAD_Val_Rule_ID() > 0) { if (infoColumn.getAD_Val_Rule_ID() > 0) {
vo.ValidationCode = infoColumn.getAD_Val_Rule().getCode(); vo.ValidationCode = infoColumn.getAD_Val_Rule().getCode();
if (vo.lookupInfo != null) { if (vo.lookupInfo != null) {
@ -2026,7 +2026,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
String columnName = infoColumn.getColumnName(); String columnName = infoColumn.getColumnName();
GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, AEnv.getADWindowID(p_WindowNo), m_infoWindowID, 0, GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, AEnv.getADWindowID(p_WindowNo), m_infoWindowID, 0,
columnName, infoColumn.get_Translation("Name"), infoColumn.getAD_Reference_ID(), columnName, infoColumn.get_Translation("Name"), infoColumn.getAD_Reference_ID(),
infoColumn.getAD_Reference_Value_ID(), false, false, infoColumn.getPlaceholder()); infoColumn.getAD_Reference_Value_ID(), false, false, infoColumn.get_Translation("Placeholder"));
if (infoColumn.getAD_Val_Rule_ID() > 0) { if (infoColumn.getAD_Val_Rule_ID() > 0) {
vo.ValidationCode = infoColumn.getAD_Val_Rule().getCode(); vo.ValidationCode = infoColumn.getAD_Val_Rule().getCode();
if (vo.lookupInfo != null) { if (vo.lookupInfo != null) {

View File

@ -29,6 +29,7 @@ import org.adempiere.exceptions.AdempiereException;
import org.adempiere.webui.AdempiereWebUI; import org.adempiere.webui.AdempiereWebUI;
import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.Button; import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Checkbox;
import org.adempiere.webui.component.FolderBrowser; import org.adempiere.webui.component.FolderBrowser;
import org.adempiere.webui.component.Grid; import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.GridFactory; import org.adempiere.webui.component.GridFactory;
@ -119,6 +120,7 @@ public class WTranslationDialog extends TranslationController implements IFormCo
private int m_AD_Client_ID; private int m_AD_Client_ID;
private boolean m_imp; private boolean m_imp;
private ValueNamePair m_AD_Language; private ValueNamePair m_AD_Language;
private Checkbox isOnlyCentralized = new Checkbox();
private void zkInit() throws Exception private void zkInit() throws Exception
{ {
@ -139,6 +141,8 @@ public class WTranslationDialog extends TranslationController implements IFormCo
bImportZIP.setLabel(Msg.getMsg(Env.getCtx(), "ImportZIP")); bImportZIP.setLabel(Msg.getMsg(Env.getCtx(), "ImportZIP"));
bImportZIP.setUpload(AdempiereWebUI.getUploadSetting()); bImportZIP.setUpload(AdempiereWebUI.getUploadSetting());
bImportZIP.addEventListener(Events.ON_UPLOAD, this); bImportZIP.addEventListener(Events.ON_UPLOAD, this);
isOnlyCentralized.setLabel(Msg.getMsg(Env.getCtx(), "OnlyCentralizedData"));
isOnlyCentralized.setChecked(true);
Rows rows = centerLayout.newRows(); Rows rows = centerLayout.newRows();
Row row = rows.newRow(); Row row = rows.newRow();
@ -152,7 +156,11 @@ public class WTranslationDialog extends TranslationController implements IFormCo
row = rows.newRow(); row = rows.newRow();
row.appendChild(lTable.rightAlign()); row.appendChild(lTable.rightAlign());
row.appendChild(cbTable); row.appendChild(cbTable);
row = rows.newRow();
row.appendChild(new Label(""));
row.appendChild(isOnlyCentralized);
row = rows.newRow(); row = rows.newRow();
Div div = new Div(); Div div = new Div();
div.setStyle("text-align: right;"); div.setStyle("text-align: right;");
@ -298,7 +306,7 @@ public class WTranslationDialog extends TranslationController implements IFormCo
// Carlos Ruiz - globalqss - improve output message from translation import process // Carlos Ruiz - globalqss - improve output message from translation import process
msg.append(m_AD_Table.getValue()).append(" ").append((m_imp msg.append(m_AD_Table.getValue()).append(" ").append((m_imp
? t.importTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue()) ? t.importTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue())
: t.exportTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue()))).append(" "); : t.exportTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue(), isOnlyCentralized.isChecked()))).append(" ");
} }
if(msg == null || msg.length() == 0) if(msg == null || msg.length() == 0)
@ -311,7 +319,7 @@ public class WTranslationDialog extends TranslationController implements IFormCo
msg = null; msg = null;
msg = new StringBuilder(m_imp msg = new StringBuilder(m_imp
? t.importTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue()) ? t.importTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue())
: t.exportTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue())); : t.exportTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue(), isOnlyCentralized.isChecked()));
if(msg == null || msg.length() == 0) if(msg == null || msg.length() == 0)
msg = new StringBuilder(m_imp ? "Import" : "Export").append(" Successful. [").append(directory).append("]"); msg = new StringBuilder(m_imp ? "Import" : "Export").append(" Successful. [").append(directory).append("]");

View File

@ -15,6 +15,7 @@
package org.adempiere.webui.panel; package org.adempiere.webui.panel;
import java.util.ArrayList;
import java.util.Properties; import java.util.Properties;
import org.adempiere.exceptions.AdempiereException; import org.adempiere.exceptions.AdempiereException;
@ -32,6 +33,8 @@ import org.adempiere.webui.theme.ITheme;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.LoginWindow; import org.adempiere.webui.window.LoginWindow;
import org.compiere.model.MPasswordHistory;
import org.compiere.model.MPasswordRule;
import org.compiere.model.MSysConfig; import org.compiere.model.MSysConfig;
import org.compiere.model.MUser; import org.compiere.model.MUser;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
@ -44,8 +47,10 @@ import org.zkoss.zhtml.Div;
import org.zkoss.zhtml.Table; import org.zkoss.zhtml.Table;
import org.zkoss.zhtml.Td; import org.zkoss.zhtml.Td;
import org.zkoss.zhtml.Tr; import org.zkoss.zhtml.Tr;
import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zul.Image; import org.zkoss.zul.Image;
@ -59,7 +64,7 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
/** /**
* *
*/ */
private static final long serialVersionUID = 6055606520280550335L; private static final long serialVersionUID = -4117126419866788951L;
private static CLogger logger = CLogger.getCLogger(ChangePasswordPanel.class); private static CLogger logger = CLogger.getCLogger(ChangePasswordPanel.class);
@ -246,12 +251,14 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
txtNewPassword.setId("txtNewPassword"); txtNewPassword.setId("txtNewPassword");
txtNewPassword.setType("password"); txtNewPassword.setType("password");
txtNewPassword.setCols(25); txtNewPassword.setCols(25);
txtNewPassword.addEventListener(Events.ON_BLUR, this);
ZKUpdateUtil.setWidth(txtNewPassword, "220px"); ZKUpdateUtil.setWidth(txtNewPassword, "220px");
txtRetypeNewPassword = new Textbox(); txtRetypeNewPassword = new Textbox();
txtRetypeNewPassword.setId("txtRetypeNewPassword"); txtRetypeNewPassword.setId("txtRetypeNewPassword");
txtRetypeNewPassword.setType("password"); txtRetypeNewPassword.setType("password");
txtRetypeNewPassword.setCols(25); txtRetypeNewPassword.setCols(25);
txtRetypeNewPassword.addEventListener(Events.ON_BLUR, this);
ZKUpdateUtil.setWidth(txtRetypeNewPassword, "220px"); ZKUpdateUtil.setWidth(txtRetypeNewPassword, "220px");
txtAnswer = new Textbox(); txtAnswer = new Textbox();
@ -272,6 +279,21 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
SessionManager.logoutSession(); SessionManager.logoutSession();
wndLogin.loginCancelled(); wndLogin.loginCancelled();
} }
else if (event.getTarget() == txtNewPassword) {
MPasswordRule pwdrule = MPasswordRule.getRules(Env.getCtx(), null);
if (pwdrule != null) {
try {
pwdrule.validate(m_userName, txtNewPassword.getValue(), new ArrayList<MPasswordHistory>());
}
catch (Exception e) {
throw new WrongValueException(txtNewPassword, e.getMessage());
}
}
}
else if (event.getTarget() == txtRetypeNewPassword) {
if (!txtNewPassword.getValue().equals(txtRetypeNewPassword.getValue()))
throw new WrongValueException(txtRetypeNewPassword, Msg.getMsg(m_ctx, "PasswordNotMatch"));
}
} }
public void validateChangePassword() public void validateChangePassword()