IDEMPIERE-4459 Info Window Customization (#259)
* IDEMPIERE-4459 Info Window Customization - Added Java Models * IDEMPIERE-4459 Update Model AD_UserDef_Info_Column * IDEMPIERE-4459 Added Migration scripts * IDEMPIERE-4459 User Definition Info Column Added Added Business Logic for Info Window Customization for Info Columns. Added InfoColumnVO for storing InfoColumn Data filtered with User Definition. * IDEMPIERE-4459 Added Migration Scripts to Update Columns Allow Update AD_Role_ID, AD_Language, AD_User_ID in AD_UserDef_Info table. * IDEMPIERE-4459 Info Window Customisation - Updated Migration scripts * IDEMPIERE-4459 Migration Script Fix * IDEMPIERE-4459 Info Window Customization - Update Java Models * IDEMPIERE-4459 Apply Migration Patch * IDEMPIERE-4459 Info Window Customization - Update Models * IDEMPIERE-4459 Apply Patch 2 fix. * IDEMPIERE-4459 Info Related Cust. Added, Info Window Cust. Implementation.. * IDEMPIERE-4459 Info Related isDisplay added * IDEMPIERE-4459 Added Display Logic for Info Related * IDEMPIERE-4459 Fix SeqNo for InfoColumns * IDEMPIERE-4459 Fix Patch 3
This commit is contained in:
parent
b8e9e455f1
commit
3246bb8b1e
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,48 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-4459
|
||||
-- Oct 15, 2020, 9:38:15 AM CEST
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,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,IsHtml) VALUES (214326,0,'Display Logic','If the Field is displayed, the result determines if the field is actually displayed','format := {expression} [{logic} {expression}]<br>
|
||||
expression := @{context}@{operand}{value} or @{context}@{operand}{value}<br>
|
||||
logic := {|}|{&}<br>
|
||||
context := any global or window context <br>
|
||||
value := strings or numbers<br>
|
||||
logic operators := AND or OR with the previous result from left to right <br>
|
||||
operand := eq{=}, gt{>}, le{<}, not{~^!} <br>
|
||||
Examples: <br>
|
||||
'||chr(64)||'AD_Table_ID@=14 | @Language@!GERGER <br>
|
||||
'||chr(64)||'PriceLimit@>10 | @PriceList@>@PriceActual@<br>
|
||||
'||chr(64)||'Name@>J<br>
|
||||
Strings may be in single quotes (optional)',200089,'DisplayLogic',2000,'N','N','N','N','N',0,'N',14,0,0,'Y',TO_DATE('2020-10-15 09:38:15','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-10-15 09:38:15','YYYY-MM-DD HH24:MI:SS'),100,283,'Y','N','D','N','N','N','Y','835e7d84-da0d-448f-b851-d03203219fe2','Y',0,'N','N','N','N')
|
||||
;
|
||||
|
||||
-- Oct 15, 2020, 9:38:27 AM CEST
|
||||
ALTER TABLE AD_InfoRelated ADD DisplayLogic VARCHAR2(2000 CHAR) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Oct 15, 2020, 9:39:16 AM CEST
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,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,ColumnSpan,NumLines) VALUES (206520,'Display Logic','If the Field is displayed, the result determines if the field is actually displayed','format := {expression} [{logic} {expression}]<br>
|
||||
expression := @{context}@{operand}{value} or @{context}@{operand}{value}<br>
|
||||
logic := {|}|{&}<br>
|
||||
context := any global or window context <br>
|
||||
value := strings or numbers<br>
|
||||
logic operators := AND or OR with the previous result from left to right <br>
|
||||
operand := eq{=}, gt{>}, le{<}, not{~^!} <br>
|
||||
Examples: <br>
|
||||
'||chr(64)||'AD_Table_ID@=14 | @Language@!GERGER <br>
|
||||
'||chr(64)||'PriceLimit@>10 | @PriceList@>@PriceActual@<br>
|
||||
'||chr(64)||'Name@>J<br>
|
||||
Strings may be in single quotes (optional)',200100,214326,'Y',2000,130,'N','N','N','N',0,0,'Y',TO_DATE('2020-10-15 09:39:16','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-10-15 09:39:16','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','6ba1b12a-abbb-4e56-92ea-2391ffa6e5fb','Y',100,5,3)
|
||||
;
|
||||
|
||||
-- Oct 15, 2020, 6:39:04 PM CEST
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, ColumnSpan=5, NumLines=1, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-15 18:39:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206500
|
||||
;
|
||||
|
||||
-- Oct 15, 2020, 6:39:27 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, NumLines=1, IsToolbarButton=NULL,Updated=TO_DATE('2020-10-15 18:39:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206520
|
||||
;
|
||||
|
||||
SELECT register_migration_script('202010150940_IDEMPIERE-4459.sql') FROM dual
|
||||
;
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,45 @@
|
|||
-- IDEMPIERE-4459
|
||||
-- Oct 15, 2020, 9:38:15 AM CEST
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,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,IsHtml) VALUES (214326,0,'Display Logic','If the Field is displayed, the result determines if the field is actually displayed','format := {expression} [{logic} {expression}]<br>
|
||||
expression := @{context}@{operand}{value} or @{context}@{operand}{value}<br>
|
||||
logic := {|}|{&}<br>
|
||||
context := any global or window context <br>
|
||||
value := strings or numbers<br>
|
||||
logic operators := AND or OR with the previous result from left to right <br>
|
||||
operand := eq{=}, gt{>}, le{<}, not{~^!} <br>
|
||||
Examples: <br>
|
||||
@AD_Table_ID@=14 | @Language@!GERGER <br>
|
||||
@PriceLimit@>10 | @PriceList@>@PriceActual@<br>
|
||||
@Name@>J<br>
|
||||
Strings may be in single quotes (optional)',200089,'DisplayLogic',2000,'N','N','N','N','N',0,'N',14,0,0,'Y',TO_TIMESTAMP('2020-10-15 09:38:15','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-10-15 09:38:15','YYYY-MM-DD HH24:MI:SS'),100,283,'Y','N','D','N','N','N','Y','835e7d84-da0d-448f-b851-d03203219fe2','Y',0,'N','N','N','N')
|
||||
;
|
||||
|
||||
-- Oct 15, 2020, 9:38:27 AM CEST
|
||||
ALTER TABLE AD_InfoRelated ADD COLUMN DisplayLogic VARCHAR(2000) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Oct 15, 2020, 9:39:16 AM CEST
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,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,ColumnSpan,NumLines) VALUES (206520,'Display Logic','If the Field is displayed, the result determines if the field is actually displayed','format := {expression} [{logic} {expression}]<br>
|
||||
expression := @{context}@{operand}{value} or @{context}@{operand}{value}<br>
|
||||
logic := {|}|{&}<br>
|
||||
context := any global or window context <br>
|
||||
value := strings or numbers<br>
|
||||
logic operators := AND or OR with the previous result from left to right <br>
|
||||
operand := eq{=}, gt{>}, le{<}, not{~^!} <br>
|
||||
Examples: <br>
|
||||
@AD_Table_ID@=14 | @Language@!GERGER <br>
|
||||
@PriceLimit@>10 | @PriceList@>@PriceActual@<br>
|
||||
@Name@>J<br>
|
||||
Strings may be in single quotes (optional)',200100,214326,'Y',2000,130,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2020-10-15 09:39:16','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-10-15 09:39:16','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','6ba1b12a-abbb-4e56-92ea-2391ffa6e5fb','Y',100,5,3)
|
||||
;
|
||||
|
||||
-- Oct 15, 2020, 6:39:04 PM CEST
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, ColumnSpan=5, NumLines=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-15 18:39:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206500
|
||||
;
|
||||
|
||||
-- Oct 15, 2020, 6:39:27 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, NumLines=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-10-15 18:39:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206520
|
||||
;
|
||||
|
||||
SELECT register_migration_script('202010150940_IDEMPIERE-4459.sql') FROM dual
|
||||
;
|
|
@ -124,6 +124,19 @@ public interface I_AD_InfoRelated
|
|||
*/
|
||||
public String getDescription();
|
||||
|
||||
/** Column name DisplayLogic */
|
||||
public static final String COLUMNNAME_DisplayLogic = "DisplayLogic";
|
||||
|
||||
/** Set Display Logic.
|
||||
* If the Field is displayed, the result determines if the field is actually displayed
|
||||
*/
|
||||
public void setDisplayLogic (String DisplayLogic);
|
||||
|
||||
/** Get Display Logic.
|
||||
* If the Field is displayed, the result determines if the field is actually displayed
|
||||
*/
|
||||
public String getDisplayLogic();
|
||||
|
||||
/** Column name EntityType */
|
||||
public static final String COLUMNNAME_EntityType = "EntityType";
|
||||
|
||||
|
|
|
@ -0,0 +1,224 @@
|
|||
/******************************************************************************
|
||||
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software, you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/** Generated Interface for AD_UserDef_Info
|
||||
* @author iDempiere (generated)
|
||||
* @version Release 7.1
|
||||
*/
|
||||
public interface I_AD_UserDef_Info
|
||||
{
|
||||
|
||||
/** TableName=AD_UserDef_Info */
|
||||
public static final String Table_Name = "AD_UserDef_Info";
|
||||
|
||||
/** AD_Table_ID=200266 */
|
||||
public static final int Table_ID = 200266;
|
||||
|
||||
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||
|
||||
/** AccessLevel = 6 - System - Client
|
||||
*/
|
||||
BigDecimal accessLevel = BigDecimal.valueOf(6);
|
||||
|
||||
/** Load Meta Data */
|
||||
|
||||
/** Column name AD_Client_ID */
|
||||
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||
|
||||
/** Get Client.
|
||||
* Client/Tenant for this installation.
|
||||
*/
|
||||
public int getAD_Client_ID();
|
||||
|
||||
/** Column name AD_InfoWindow_ID */
|
||||
public static final String COLUMNNAME_AD_InfoWindow_ID = "AD_InfoWindow_ID";
|
||||
|
||||
/** Set Info Window.
|
||||
* Info and search/select Window
|
||||
*/
|
||||
public void setAD_InfoWindow_ID (int AD_InfoWindow_ID);
|
||||
|
||||
/** Get Info Window.
|
||||
* Info and search/select Window
|
||||
*/
|
||||
public int getAD_InfoWindow_ID();
|
||||
|
||||
public org.compiere.model.I_AD_InfoWindow getAD_InfoWindow() throws RuntimeException;
|
||||
|
||||
/** Column name AD_Language */
|
||||
public static final String COLUMNNAME_AD_Language = "AD_Language";
|
||||
|
||||
/** Set Language.
|
||||
* Language for this entity
|
||||
*/
|
||||
public void setAD_Language (String AD_Language);
|
||||
|
||||
/** Get Language.
|
||||
* Language for this entity
|
||||
*/
|
||||
public String getAD_Language();
|
||||
|
||||
/** Column name AD_Org_ID */
|
||||
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||
|
||||
/** Set Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public void setAD_Org_ID (int AD_Org_ID);
|
||||
|
||||
/** Get Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name AD_Role_ID */
|
||||
public static final String COLUMNNAME_AD_Role_ID = "AD_Role_ID";
|
||||
|
||||
/** Set Role.
|
||||
* Responsibility Role
|
||||
*/
|
||||
public void setAD_Role_ID (int AD_Role_ID);
|
||||
|
||||
/** Get Role.
|
||||
* Responsibility Role
|
||||
*/
|
||||
public int getAD_Role_ID();
|
||||
|
||||
public org.compiere.model.I_AD_Role getAD_Role() throws RuntimeException;
|
||||
|
||||
/** Column name AD_UserDef_Info_ID */
|
||||
public static final String COLUMNNAME_AD_UserDef_Info_ID = "AD_UserDef_Info_ID";
|
||||
|
||||
/** Set User defined Info Window */
|
||||
public void setAD_UserDef_Info_ID (int AD_UserDef_Info_ID);
|
||||
|
||||
/** Get User defined Info Window */
|
||||
public int getAD_UserDef_Info_ID();
|
||||
|
||||
/** Column name AD_UserDef_Info_UU */
|
||||
public static final String COLUMNNAME_AD_UserDef_Info_UU = "AD_UserDef_Info_UU";
|
||||
|
||||
/** Set AD_UserDef_Info_UU */
|
||||
public void setAD_UserDef_Info_UU (String AD_UserDef_Info_UU);
|
||||
|
||||
/** Get AD_UserDef_Info_UU */
|
||||
public String getAD_UserDef_Info_UU();
|
||||
|
||||
/** Column name AD_User_ID */
|
||||
public static final String COLUMNNAME_AD_User_ID = "AD_User_ID";
|
||||
|
||||
/** Set User/Contact.
|
||||
* User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public void setAD_User_ID (int AD_User_ID);
|
||||
|
||||
/** Get User/Contact.
|
||||
* User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public int getAD_User_ID();
|
||||
|
||||
public org.compiere.model.I_AD_User getAD_User() throws RuntimeException;
|
||||
|
||||
/** Column name Created */
|
||||
public static final String COLUMNNAME_Created = "Created";
|
||||
|
||||
/** Get Created.
|
||||
* Date this record was created
|
||||
*/
|
||||
public Timestamp getCreated();
|
||||
|
||||
/** Column name CreatedBy */
|
||||
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||
|
||||
/** Get Created By.
|
||||
* User who created this records
|
||||
*/
|
||||
public int getCreatedBy();
|
||||
|
||||
/** Column name Description */
|
||||
public static final String COLUMNNAME_Description = "Description";
|
||||
|
||||
/** Set Description.
|
||||
* Optional short description of the record
|
||||
*/
|
||||
public void setDescription (String Description);
|
||||
|
||||
/** Get Description.
|
||||
* Optional short description of the record
|
||||
*/
|
||||
public String getDescription();
|
||||
|
||||
/** Column name Help */
|
||||
public static final String COLUMNNAME_Help = "Help";
|
||||
|
||||
/** Set Comment/Help.
|
||||
* Comment or Hint
|
||||
*/
|
||||
public void setHelp (String Help);
|
||||
|
||||
/** Get Comment/Help.
|
||||
* Comment or Hint
|
||||
*/
|
||||
public String getHelp();
|
||||
|
||||
/** Column name IsActive */
|
||||
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||
|
||||
/** Set Active.
|
||||
* The record is active in the system
|
||||
*/
|
||||
public void setIsActive (boolean IsActive);
|
||||
|
||||
/** Get Active.
|
||||
* The record is active in the system
|
||||
*/
|
||||
public boolean isActive();
|
||||
|
||||
/** Column name Name */
|
||||
public static final String COLUMNNAME_Name = "Name";
|
||||
|
||||
/** Set Name.
|
||||
* Alphanumeric identifier of the entity
|
||||
*/
|
||||
public void setName (String Name);
|
||||
|
||||
/** Get Name.
|
||||
* Alphanumeric identifier of the entity
|
||||
*/
|
||||
public String getName();
|
||||
|
||||
/** Column name Updated */
|
||||
public static final String COLUMNNAME_Updated = "Updated";
|
||||
|
||||
/** Get Updated.
|
||||
* Date this record was updated
|
||||
*/
|
||||
public Timestamp getUpdated();
|
||||
|
||||
/** Column name UpdatedBy */
|
||||
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||
|
||||
/** Get Updated By.
|
||||
* User who updated this records
|
||||
*/
|
||||
public int getUpdatedBy();
|
||||
}
|
|
@ -0,0 +1,421 @@
|
|||
/******************************************************************************
|
||||
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software, you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/** Generated Interface for AD_UserDef_Info_Column
|
||||
* @author iDempiere (generated)
|
||||
* @version Release 7.1
|
||||
*/
|
||||
public interface I_AD_UserDef_Info_Column
|
||||
{
|
||||
|
||||
/** TableName=AD_UserDef_Info_Column */
|
||||
public static final String Table_Name = "AD_UserDef_Info_Column";
|
||||
|
||||
/** AD_Table_ID=200268 */
|
||||
public static final int Table_ID = 200268;
|
||||
|
||||
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||
|
||||
/** AccessLevel = 6 - System - Client
|
||||
*/
|
||||
BigDecimal accessLevel = BigDecimal.valueOf(6);
|
||||
|
||||
/** Load Meta Data */
|
||||
|
||||
/** Column name AD_Client_ID */
|
||||
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||
|
||||
/** Get Client.
|
||||
* Client/Tenant for this installation.
|
||||
*/
|
||||
public int getAD_Client_ID();
|
||||
|
||||
/** Column name AD_FieldStyle_ID */
|
||||
public static final String COLUMNNAME_AD_FieldStyle_ID = "AD_FieldStyle_ID";
|
||||
|
||||
/** Set Field Style.
|
||||
* Field CSS Style
|
||||
*/
|
||||
public void setAD_FieldStyle_ID (int AD_FieldStyle_ID);
|
||||
|
||||
/** Get Field Style.
|
||||
* Field CSS Style
|
||||
*/
|
||||
public int getAD_FieldStyle_ID();
|
||||
|
||||
public org.compiere.model.I_AD_Style getAD_FieldStyle() throws RuntimeException;
|
||||
|
||||
/** Column name AD_InfoColumn_ID */
|
||||
public static final String COLUMNNAME_AD_InfoColumn_ID = "AD_InfoColumn_ID";
|
||||
|
||||
/** Set Info Column.
|
||||
* Info Window Column
|
||||
*/
|
||||
public void setAD_InfoColumn_ID (int AD_InfoColumn_ID);
|
||||
|
||||
/** Get Info Column.
|
||||
* Info Window Column
|
||||
*/
|
||||
public int getAD_InfoColumn_ID();
|
||||
|
||||
public org.compiere.model.I_AD_InfoColumn getAD_InfoColumn() throws RuntimeException;
|
||||
|
||||
/** Column name AD_Org_ID */
|
||||
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||
|
||||
/** Set Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public void setAD_Org_ID (int AD_Org_ID);
|
||||
|
||||
/** Get Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name AD_Reference_ID */
|
||||
public static final String COLUMNNAME_AD_Reference_ID = "AD_Reference_ID";
|
||||
|
||||
/** Set Reference.
|
||||
* System Reference and Validation
|
||||
*/
|
||||
public void setAD_Reference_ID (int AD_Reference_ID);
|
||||
|
||||
/** Get Reference.
|
||||
* System Reference and Validation
|
||||
*/
|
||||
public int getAD_Reference_ID();
|
||||
|
||||
public org.compiere.model.I_AD_Reference getAD_Reference() throws RuntimeException;
|
||||
|
||||
/** Column name AD_Reference_Value_ID */
|
||||
public static final String COLUMNNAME_AD_Reference_Value_ID = "AD_Reference_Value_ID";
|
||||
|
||||
/** Set Reference Key.
|
||||
* Required to specify, if data type is Table or List
|
||||
*/
|
||||
public void setAD_Reference_Value_ID (int AD_Reference_Value_ID);
|
||||
|
||||
/** Get Reference Key.
|
||||
* Required to specify, if data type is Table or List
|
||||
*/
|
||||
public int getAD_Reference_Value_ID();
|
||||
|
||||
public org.compiere.model.I_AD_Reference getAD_Reference_Value() throws RuntimeException;
|
||||
|
||||
/** Column name AD_UserDef_Info_Column_ID */
|
||||
public static final String COLUMNNAME_AD_UserDef_Info_Column_ID = "AD_UserDef_Info_Column_ID";
|
||||
|
||||
/** Set User defined Info Column */
|
||||
public void setAD_UserDef_Info_Column_ID (int AD_UserDef_Info_Column_ID);
|
||||
|
||||
/** Get User defined Info Column */
|
||||
public int getAD_UserDef_Info_Column_ID();
|
||||
|
||||
/** Column name AD_UserDef_Info_Column_UU */
|
||||
public static final String COLUMNNAME_AD_UserDef_Info_Column_UU = "AD_UserDef_Info_Column_UU";
|
||||
|
||||
/** Set AD_UserDef_Info_Column_UU */
|
||||
public void setAD_UserDef_Info_Column_UU (String AD_UserDef_Info_Column_UU);
|
||||
|
||||
/** Get AD_UserDef_Info_Column_UU */
|
||||
public String getAD_UserDef_Info_Column_UU();
|
||||
|
||||
/** Column name AD_UserDef_Info_ID */
|
||||
public static final String COLUMNNAME_AD_UserDef_Info_ID = "AD_UserDef_Info_ID";
|
||||
|
||||
/** Set User defined Info Window */
|
||||
public void setAD_UserDef_Info_ID (int AD_UserDef_Info_ID);
|
||||
|
||||
/** Get User defined Info Window */
|
||||
public int getAD_UserDef_Info_ID();
|
||||
|
||||
public org.compiere.model.I_AD_UserDef_Info getAD_UserDef_Info() throws RuntimeException;
|
||||
|
||||
/** Column name AD_Val_Rule_ID */
|
||||
public static final String COLUMNNAME_AD_Val_Rule_ID = "AD_Val_Rule_ID";
|
||||
|
||||
/** Set Dynamic Validation.
|
||||
* Dynamic Validation Rule
|
||||
*/
|
||||
public void setAD_Val_Rule_ID (int AD_Val_Rule_ID);
|
||||
|
||||
/** Get Dynamic Validation.
|
||||
* Dynamic Validation Rule
|
||||
*/
|
||||
public int getAD_Val_Rule_ID();
|
||||
|
||||
public org.compiere.model.I_AD_Val_Rule getAD_Val_Rule() throws RuntimeException;
|
||||
|
||||
/** Column name Created */
|
||||
public static final String COLUMNNAME_Created = "Created";
|
||||
|
||||
/** Get Created.
|
||||
* Date this record was created
|
||||
*/
|
||||
public Timestamp getCreated();
|
||||
|
||||
/** Column name CreatedBy */
|
||||
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||
|
||||
/** Get Created By.
|
||||
* User who created this records
|
||||
*/
|
||||
public int getCreatedBy();
|
||||
|
||||
/** Column name DefaultValue */
|
||||
public static final String COLUMNNAME_DefaultValue = "DefaultValue";
|
||||
|
||||
/** Set Default Logic.
|
||||
* Default value hierarchy, separated by ;
|
||||
|
||||
*/
|
||||
public void setDefaultValue (String DefaultValue);
|
||||
|
||||
/** Get Default Logic.
|
||||
* Default value hierarchy, separated by ;
|
||||
|
||||
*/
|
||||
public String getDefaultValue();
|
||||
|
||||
/** Column name Description */
|
||||
public static final String COLUMNNAME_Description = "Description";
|
||||
|
||||
/** Set Description.
|
||||
* Optional short description of the record
|
||||
*/
|
||||
public void setDescription (String Description);
|
||||
|
||||
/** Get Description.
|
||||
* Optional short description of the record
|
||||
*/
|
||||
public String getDescription();
|
||||
|
||||
/** Column name DisplayLogic */
|
||||
public static final String COLUMNNAME_DisplayLogic = "DisplayLogic";
|
||||
|
||||
/** Set Display Logic.
|
||||
* If the Field is displayed, the result determines if the field is actually displayed
|
||||
*/
|
||||
public void setDisplayLogic (String DisplayLogic);
|
||||
|
||||
/** Get Display Logic.
|
||||
* If the Field is displayed, the result determines if the field is actually displayed
|
||||
*/
|
||||
public String getDisplayLogic();
|
||||
|
||||
/** Column name Help */
|
||||
public static final String COLUMNNAME_Help = "Help";
|
||||
|
||||
/** Set Comment/Help.
|
||||
* Comment or Hint
|
||||
*/
|
||||
public void setHelp (String Help);
|
||||
|
||||
/** Get Comment/Help.
|
||||
* Comment or Hint
|
||||
*/
|
||||
public String getHelp();
|
||||
|
||||
/** Column name InputFieldValidation */
|
||||
public static final String COLUMNNAME_InputFieldValidation = "InputFieldValidation";
|
||||
|
||||
/** Set Input field validation.
|
||||
* Input field validaton query
|
||||
*/
|
||||
public void setInputFieldValidation (String InputFieldValidation);
|
||||
|
||||
/** Get Input field validation.
|
||||
* Input field validaton query
|
||||
*/
|
||||
public String getInputFieldValidation();
|
||||
|
||||
/** Column name IsActive */
|
||||
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||
|
||||
/** Set Active.
|
||||
* The record is active in the system
|
||||
*/
|
||||
public void setIsActive (boolean IsActive);
|
||||
|
||||
/** Get Active.
|
||||
* The record is active in the system
|
||||
*/
|
||||
public boolean isActive();
|
||||
|
||||
/** Column name IsAutocomplete */
|
||||
public static final String COLUMNNAME_IsAutocomplete = "IsAutocomplete";
|
||||
|
||||
/** Set Autocomplete.
|
||||
* Automatic completion for textfields
|
||||
*/
|
||||
public void setIsAutocomplete (String IsAutocomplete);
|
||||
|
||||
/** Get Autocomplete.
|
||||
* Automatic completion for textfields
|
||||
*/
|
||||
public String getIsAutocomplete();
|
||||
|
||||
/** Column name IsDisplayed */
|
||||
public static final String COLUMNNAME_IsDisplayed = "IsDisplayed";
|
||||
|
||||
/** Set Displayed.
|
||||
* Determines, if this field is displayed
|
||||
*/
|
||||
public void setIsDisplayed (String IsDisplayed);
|
||||
|
||||
/** Get Displayed.
|
||||
* Determines, if this field is displayed
|
||||
*/
|
||||
public String getIsDisplayed();
|
||||
|
||||
/** Column name IsMandatory */
|
||||
public static final String COLUMNNAME_IsMandatory = "IsMandatory";
|
||||
|
||||
/** Set Mandatory.
|
||||
* Data entry is required in this column
|
||||
*/
|
||||
public void setIsMandatory (String IsMandatory);
|
||||
|
||||
/** Get Mandatory.
|
||||
* Data entry is required in this column
|
||||
*/
|
||||
public String getIsMandatory();
|
||||
|
||||
/** Column name IsQueryCriteria */
|
||||
public static final String COLUMNNAME_IsQueryCriteria = "IsQueryCriteria";
|
||||
|
||||
/** Set Query Criteria.
|
||||
* The column is also used as a query criteria
|
||||
*/
|
||||
public void setIsQueryCriteria (String IsQueryCriteria);
|
||||
|
||||
/** Get Query Criteria.
|
||||
* The column is also used as a query criteria
|
||||
*/
|
||||
public String getIsQueryCriteria();
|
||||
|
||||
/** Column name IsReadOnly */
|
||||
public static final String COLUMNNAME_IsReadOnly = "IsReadOnly";
|
||||
|
||||
/** Set Read Only.
|
||||
* Field is read only
|
||||
*/
|
||||
public void setIsReadOnly (String IsReadOnly);
|
||||
|
||||
/** Get Read Only.
|
||||
* Field is read only
|
||||
*/
|
||||
public String getIsReadOnly();
|
||||
|
||||
/** Column name Name */
|
||||
public static final String COLUMNNAME_Name = "Name";
|
||||
|
||||
/** Set Name.
|
||||
* Alphanumeric identifier of the entity
|
||||
*/
|
||||
public void setName (String Name);
|
||||
|
||||
/** Get Name.
|
||||
* Alphanumeric identifier of the entity
|
||||
*/
|
||||
public String getName();
|
||||
|
||||
/** Column name Placeholder */
|
||||
public static final String COLUMNNAME_Placeholder = "Placeholder";
|
||||
|
||||
/** Set Placeholder */
|
||||
public void setPlaceholder (String Placeholder);
|
||||
|
||||
/** Get Placeholder */
|
||||
public String getPlaceholder();
|
||||
|
||||
/** Column name QueryFunction */
|
||||
public static final String COLUMNNAME_QueryFunction = "QueryFunction";
|
||||
|
||||
/** Set Query Function.
|
||||
* Database function for query
|
||||
*/
|
||||
public void setQueryFunction (String QueryFunction);
|
||||
|
||||
/** Get Query Function.
|
||||
* Database function for query
|
||||
*/
|
||||
public String getQueryFunction();
|
||||
|
||||
/** Column name QueryOperator */
|
||||
public static final String COLUMNNAME_QueryOperator = "QueryOperator";
|
||||
|
||||
/** Set Query Operator.
|
||||
* Operator for database query
|
||||
*/
|
||||
public void setQueryOperator (String QueryOperator);
|
||||
|
||||
/** Get Query Operator.
|
||||
* Operator for database query
|
||||
*/
|
||||
public String getQueryOperator();
|
||||
|
||||
/** Column name SeqNo */
|
||||
public static final String COLUMNNAME_SeqNo = "SeqNo";
|
||||
|
||||
/** Set Sequence.
|
||||
* Method of ordering records;
|
||||
lowest number comes first
|
||||
*/
|
||||
public void setSeqNo (int SeqNo);
|
||||
|
||||
/** Get Sequence.
|
||||
* Method of ordering records;
|
||||
lowest number comes first
|
||||
*/
|
||||
public int getSeqNo();
|
||||
|
||||
/** Column name SeqNoSelection */
|
||||
public static final String COLUMNNAME_SeqNoSelection = "SeqNoSelection";
|
||||
|
||||
/** Set Selection Column Sequence.
|
||||
* Selection Column Sequence
|
||||
*/
|
||||
public void setSeqNoSelection (int SeqNoSelection);
|
||||
|
||||
/** Get Selection Column Sequence.
|
||||
* Selection Column Sequence
|
||||
*/
|
||||
public int getSeqNoSelection();
|
||||
|
||||
/** Column name Updated */
|
||||
public static final String COLUMNNAME_Updated = "Updated";
|
||||
|
||||
/** Get Updated.
|
||||
* Date this record was updated
|
||||
*/
|
||||
public Timestamp getUpdated();
|
||||
|
||||
/** Column name UpdatedBy */
|
||||
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||
|
||||
/** Get Updated By.
|
||||
* User who updated this records
|
||||
*/
|
||||
public int getUpdatedBy();
|
||||
}
|
|
@ -0,0 +1,216 @@
|
|||
/******************************************************************************
|
||||
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software, you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/** Generated Interface for AD_UserDef_Info_Related
|
||||
* @author iDempiere (generated)
|
||||
* @version Release 7.1
|
||||
*/
|
||||
public interface I_AD_UserDef_Info_Related
|
||||
{
|
||||
|
||||
/** TableName=AD_UserDef_Info_Related */
|
||||
public static final String Table_Name = "AD_UserDef_Info_Related";
|
||||
|
||||
/** AD_Table_ID=200267 */
|
||||
public static final int Table_ID = 200267;
|
||||
|
||||
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||
|
||||
/** AccessLevel = 6 - System - Client
|
||||
*/
|
||||
BigDecimal accessLevel = BigDecimal.valueOf(6);
|
||||
|
||||
/** Load Meta Data */
|
||||
|
||||
/** Column name AD_Client_ID */
|
||||
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||
|
||||
/** Get Client.
|
||||
* Client/Tenant for this installation.
|
||||
*/
|
||||
public int getAD_Client_ID();
|
||||
|
||||
/** Column name AD_InfoRelated_ID */
|
||||
public static final String COLUMNNAME_AD_InfoRelated_ID = "AD_InfoRelated_ID";
|
||||
|
||||
/** Set InfoRelated */
|
||||
public void setAD_InfoRelated_ID (int AD_InfoRelated_ID);
|
||||
|
||||
/** Get InfoRelated */
|
||||
public int getAD_InfoRelated_ID();
|
||||
|
||||
public org.compiere.model.I_AD_InfoRelated getAD_InfoRelated() throws RuntimeException;
|
||||
|
||||
/** Column name AD_Org_ID */
|
||||
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||
|
||||
/** Set Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public void setAD_Org_ID (int AD_Org_ID);
|
||||
|
||||
/** Get Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name AD_UserDef_Info_ID */
|
||||
public static final String COLUMNNAME_AD_UserDef_Info_ID = "AD_UserDef_Info_ID";
|
||||
|
||||
/** Set User defined Info Window */
|
||||
public void setAD_UserDef_Info_ID (int AD_UserDef_Info_ID);
|
||||
|
||||
/** Get User defined Info Window */
|
||||
public int getAD_UserDef_Info_ID();
|
||||
|
||||
public org.compiere.model.I_AD_UserDef_Info getAD_UserDef_Info() throws RuntimeException;
|
||||
|
||||
/** Column name AD_UserDef_Info_Related_ID */
|
||||
public static final String COLUMNNAME_AD_UserDef_Info_Related_ID = "AD_UserDef_Info_Related_ID";
|
||||
|
||||
/** Set User defined Info Related */
|
||||
public void setAD_UserDef_Info_Related_ID (int AD_UserDef_Info_Related_ID);
|
||||
|
||||
/** Get User defined Info Related */
|
||||
public int getAD_UserDef_Info_Related_ID();
|
||||
|
||||
/** Column name AD_UserDef_Info_Related_UU */
|
||||
public static final String COLUMNNAME_AD_UserDef_Info_Related_UU = "AD_UserDef_Info_Related_UU";
|
||||
|
||||
/** Set AD_UserDef_Info_Related_UU */
|
||||
public void setAD_UserDef_Info_Related_UU (String AD_UserDef_Info_Related_UU);
|
||||
|
||||
/** Get AD_UserDef_Info_Related_UU */
|
||||
public String getAD_UserDef_Info_Related_UU();
|
||||
|
||||
/** Column name Created */
|
||||
public static final String COLUMNNAME_Created = "Created";
|
||||
|
||||
/** Get Created.
|
||||
* Date this record was created
|
||||
*/
|
||||
public Timestamp getCreated();
|
||||
|
||||
/** Column name CreatedBy */
|
||||
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||
|
||||
/** Get Created By.
|
||||
* User who created this records
|
||||
*/
|
||||
public int getCreatedBy();
|
||||
|
||||
/** Column name Description */
|
||||
public static final String COLUMNNAME_Description = "Description";
|
||||
|
||||
/** Set Description.
|
||||
* Optional short description of the record
|
||||
*/
|
||||
public void setDescription (String Description);
|
||||
|
||||
/** Get Description.
|
||||
* Optional short description of the record
|
||||
*/
|
||||
public String getDescription();
|
||||
|
||||
/** Column name DisplayLogic */
|
||||
public static final String COLUMNNAME_DisplayLogic = "DisplayLogic";
|
||||
|
||||
/** Set Display Logic.
|
||||
* If the Field is displayed, the result determines if the field is actually displayed
|
||||
*/
|
||||
public void setDisplayLogic (String DisplayLogic);
|
||||
|
||||
/** Get Display Logic.
|
||||
* If the Field is displayed, the result determines if the field is actually displayed
|
||||
*/
|
||||
public String getDisplayLogic();
|
||||
|
||||
/** Column name Help */
|
||||
public static final String COLUMNNAME_Help = "Help";
|
||||
|
||||
/** Set Comment/Help.
|
||||
* Comment or Hint
|
||||
*/
|
||||
public void setHelp (String Help);
|
||||
|
||||
/** Get Comment/Help.
|
||||
* Comment or Hint
|
||||
*/
|
||||
public String getHelp();
|
||||
|
||||
/** Column name IsActive */
|
||||
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||
|
||||
/** Set Active.
|
||||
* The record is active in the system
|
||||
*/
|
||||
public void setIsActive (boolean IsActive);
|
||||
|
||||
/** Get Active.
|
||||
* The record is active in the system
|
||||
*/
|
||||
public boolean isActive();
|
||||
|
||||
/** Column name Name */
|
||||
public static final String COLUMNNAME_Name = "Name";
|
||||
|
||||
/** Set Name.
|
||||
* Alphanumeric identifier of the entity
|
||||
*/
|
||||
public void setName (String Name);
|
||||
|
||||
/** Get Name.
|
||||
* Alphanumeric identifier of the entity
|
||||
*/
|
||||
public String getName();
|
||||
|
||||
/** Column name SeqNo */
|
||||
public static final String COLUMNNAME_SeqNo = "SeqNo";
|
||||
|
||||
/** Set Sequence.
|
||||
* Method of ordering records;
|
||||
lowest number comes first
|
||||
*/
|
||||
public void setSeqNo (int SeqNo);
|
||||
|
||||
/** Get Sequence.
|
||||
* Method of ordering records;
|
||||
lowest number comes first
|
||||
*/
|
||||
public int getSeqNo();
|
||||
|
||||
/** Column name Updated */
|
||||
public static final String COLUMNNAME_Updated = "Updated";
|
||||
|
||||
/** Get Updated.
|
||||
* Date this record was updated
|
||||
*/
|
||||
public Timestamp getUpdated();
|
||||
|
||||
/** Column name UpdatedBy */
|
||||
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||
|
||||
/** Get Updated By.
|
||||
* User who updated this records
|
||||
*/
|
||||
public int getUpdatedBy();
|
||||
}
|
|
@ -0,0 +1,400 @@
|
|||
/**********************************************************************
|
||||
* This file is part of iDempiere ERP Open Source *
|
||||
* http://www.idempiere.org *
|
||||
* *
|
||||
* Copyright (C) Contributors *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation; either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||
* MA 02110-1301, USA. *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Igor Pojzl, Cloudempiere *
|
||||
**********************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Evaluatee;
|
||||
import org.compiere.util.Evaluator;
|
||||
|
||||
/**
|
||||
* Info Column Value Object
|
||||
* @author Igor Pojzl, Cloudempiere
|
||||
* @version $Id$
|
||||
*/
|
||||
public class InfoColumnVO implements Serializable, Cloneable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 7401407425423442841L;
|
||||
/** Properties */
|
||||
private Properties ctx;
|
||||
|
||||
private boolean isMandatory;
|
||||
|
||||
private boolean isQueryCriteria;
|
||||
|
||||
private boolean isReadOnly;
|
||||
|
||||
private boolean isDisplayed;
|
||||
|
||||
private boolean isIdentifier;
|
||||
|
||||
private boolean isKey;
|
||||
|
||||
private boolean isAutocomplete;
|
||||
|
||||
private int AD_Reference_ID;
|
||||
|
||||
private int AD_Reference_Value_ID;
|
||||
|
||||
private int SeqNoSelection;
|
||||
|
||||
private int AD_InfoColumn_ID;
|
||||
|
||||
private int AD_Val_Rule_ID;
|
||||
|
||||
private int AD_FieldStyle_ID;
|
||||
|
||||
private int AD_InfoWindow_ID;
|
||||
|
||||
private int SeqNo;
|
||||
|
||||
private String ColumnName;
|
||||
|
||||
private String DisplayLogic;
|
||||
|
||||
private String Name;
|
||||
|
||||
private String NameTrl;
|
||||
|
||||
private String Placeholder;
|
||||
|
||||
private String PlaceHolderTrl;
|
||||
|
||||
private String SelectClause;
|
||||
|
||||
private String InputFieldValidation;
|
||||
|
||||
private String QueryOperator;
|
||||
|
||||
private String QueryFunction;
|
||||
|
||||
private String Description;
|
||||
|
||||
private String DescriptionTrl;
|
||||
|
||||
private String DefaultValue;
|
||||
|
||||
private String HelpTrl;
|
||||
|
||||
private String Help;
|
||||
|
||||
private String ValidationCode;
|
||||
|
||||
private MInfoColumn infoColumn;
|
||||
|
||||
/**
|
||||
* Default Constructor
|
||||
* @param ctx
|
||||
* @param infoColumn
|
||||
*/
|
||||
public InfoColumnVO(Properties ctx, MInfoColumn infoColumn) {
|
||||
this.ctx = ctx;
|
||||
this.infoColumn = infoColumn;
|
||||
|
||||
AD_InfoColumn_ID = infoColumn.getAD_InfoColumn_ID();
|
||||
AD_InfoWindow_ID = infoColumn.getAD_InfoWindow_ID();
|
||||
ColumnName = infoColumn.getColumnName();
|
||||
isMandatory = infoColumn.isMandatory();
|
||||
isQueryCriteria = infoColumn.isQueryCriteria();
|
||||
NameTrl = infoColumn.get_Translation("Name");
|
||||
Name = infoColumn.getName();
|
||||
AD_Reference_ID = infoColumn.getAD_Reference_ID();
|
||||
AD_Reference_Value_ID = infoColumn.getAD_Reference_Value_ID();
|
||||
PlaceHolderTrl = infoColumn.get_Translation("Placeholder");
|
||||
Placeholder = infoColumn.getPlaceholder();
|
||||
isReadOnly = infoColumn.isReadOnly();
|
||||
SelectClause = infoColumn.getSelectClause();
|
||||
DisplayLogic = infoColumn.getDisplayLogic();
|
||||
isDisplayed = infoColumn.isDisplayed();
|
||||
InputFieldValidation = infoColumn.getInputFieldValidation();
|
||||
isIdentifier = infoColumn.isIdentifier();
|
||||
QueryOperator = infoColumn.getQueryOperator();
|
||||
SeqNoSelection = infoColumn.getSeqNoSelection();
|
||||
QueryFunction = infoColumn.getQueryFunction();
|
||||
Description = infoColumn.getDescription();
|
||||
DescriptionTrl = infoColumn.get_Translation("Description");
|
||||
isKey = infoColumn.isKey();
|
||||
DefaultValue = infoColumn.getDefaultValue();
|
||||
HelpTrl = infoColumn.get_Translation("Help");
|
||||
Help = infoColumn.getHelp();
|
||||
AD_FieldStyle_ID = infoColumn.getAD_FieldStyle_ID();
|
||||
isAutocomplete = infoColumn.isAutocomplete();
|
||||
SeqNo = infoColumn.getSeqNo();
|
||||
AD_Val_Rule_ID = infoColumn.getAD_Val_Rule_ID();
|
||||
if (infoColumn.getAD_Val_Rule_ID() > 0)
|
||||
ValidationCode = MValRule.get(ctx, infoColumn.getAD_Val_Rule_ID()).getCode();
|
||||
|
||||
|
||||
this.afterCreate();
|
||||
}
|
||||
|
||||
/**
|
||||
* User Customization Processing
|
||||
* @return InfoColumnVO
|
||||
*/
|
||||
public InfoColumnVO afterCreate() {
|
||||
InfoColumnVO vo = this;
|
||||
|
||||
// InfoColumn Customization
|
||||
MUserDefInfoColumn userDef = null;
|
||||
userDef = MUserDefInfoColumn.get(vo.ctx,vo.AD_InfoColumn_ID, vo.AD_InfoWindow_ID);
|
||||
if (userDef != null)
|
||||
{
|
||||
if (userDef.getName() != null)
|
||||
vo.Name = userDef.getName();
|
||||
if (userDef.get_Translation("Name") != null)
|
||||
vo.NameTrl = userDef.get_Translation("Name");
|
||||
if (userDef.getDescription() != null)
|
||||
vo.Description = userDef.getDescription();
|
||||
if (userDef.get_Translation("Description") != null)
|
||||
vo.DescriptionTrl = userDef.get_Translation("Description");
|
||||
if (userDef.getHelp() != null)
|
||||
vo.Help = userDef.getHelp();
|
||||
if (userDef.get_Translation("Help") != null)
|
||||
vo.HelpTrl = userDef.get_Translation("Help");
|
||||
if (userDef.getDisplayLogic() != null)
|
||||
vo.DisplayLogic = userDef.getDisplayLogic();
|
||||
if (userDef.getDefaultValue() != null)
|
||||
vo.DefaultValue = userDef.getDefaultValue();
|
||||
if (userDef.getIsDisplayed()!= null)
|
||||
vo.isDisplayed = "Y".equals(userDef.getIsDisplayed());
|
||||
if (userDef.getIsReadOnly()!= null)
|
||||
vo.isReadOnly = "Y".equals(userDef.getIsReadOnly());
|
||||
if (userDef.getAD_Reference_ID()>0)
|
||||
vo.AD_Reference_ID = userDef.getAD_Reference_ID();
|
||||
if (userDef.getAD_Reference_Value_ID()>0)
|
||||
vo.AD_Reference_Value_ID = userDef.getAD_Reference_Value_ID();
|
||||
if (userDef.getIsMandatory()!= null)
|
||||
vo.isMandatory = "Y".equals(userDef.getIsMandatory());
|
||||
if (userDef.getSeqNo() > 0)
|
||||
vo.SeqNo= userDef.getSeqNo();
|
||||
if (userDef.getSeqNoSelection() > 0)
|
||||
vo.SeqNoSelection= userDef.getSeqNoSelection();
|
||||
if (userDef.getAD_Val_Rule_ID() > 0) {
|
||||
vo.ValidationCode = MValRule.get(vo.ctx, userDef.getAD_Val_Rule_ID()).getCode();
|
||||
vo.AD_Val_Rule_ID = userDef.getAD_Val_Rule_ID();
|
||||
}
|
||||
if (userDef.getAD_FieldStyle_ID() > 0)
|
||||
vo.AD_FieldStyle_ID = userDef.getAD_FieldStyle_ID();
|
||||
if (userDef.getPlaceholder() != null)
|
||||
vo.Placeholder = userDef.getPlaceholder();
|
||||
if (userDef.get_Translation("Placeholder") != null)
|
||||
vo.PlaceHolderTrl = userDef.get_Translation("Placeholder");
|
||||
if (userDef.getInputFieldValidation() != null)
|
||||
vo.InputFieldValidation = userDef.getInputFieldValidation();
|
||||
if (userDef.getIsQueryCriteria() != null)
|
||||
vo.isQueryCriteria = "Y".equals(userDef.getIsQueryCriteria());
|
||||
if (userDef.getQueryFunction()!= null)
|
||||
vo.QueryFunction= userDef.getQueryFunction();
|
||||
if (userDef.getQueryOperator()!= null)
|
||||
vo.QueryOperator= userDef.getQueryOperator();
|
||||
if (userDef.getIsAutocomplete() != null)
|
||||
vo.isAutocomplete = "Y".equals(userDef.getIsAutocomplete());
|
||||
}
|
||||
//
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create InfoColumnVO Array from MInfoColumn Array
|
||||
* @param ctx Properties
|
||||
* @param p_infoColumns Array of MInfoColumn
|
||||
* @return InfoColumnVO[]
|
||||
*/
|
||||
public static InfoColumnVO[] create(Properties ctx, MInfoColumn[] p_infoColumns) {
|
||||
ArrayList<InfoColumnVO> infoColumns = new ArrayList<InfoColumnVO>();
|
||||
for(MInfoColumn p_infoColumn : p_infoColumns) {
|
||||
InfoColumnVO infoColumn = new InfoColumnVO(ctx, p_infoColumn);
|
||||
infoColumns.add(infoColumn);
|
||||
}
|
||||
|
||||
infoColumns.sort(new Comparator<InfoColumnVO>() {
|
||||
|
||||
@Override
|
||||
public int compare(InfoColumnVO o1, InfoColumnVO o2) {
|
||||
Integer o1SeqNo = Integer.valueOf(o1.getSeqNo());
|
||||
Integer o2SeqNo = Integer.valueOf(o2.getSeqNo());
|
||||
return o1SeqNo.compareTo(o2SeqNo);
|
||||
}
|
||||
});
|
||||
|
||||
return infoColumns.toArray(new InfoColumnVO[infoColumns.size()]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param ctx
|
||||
* @param windowNo
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isDisplayed(final Properties ctx, final int windowNo) {
|
||||
if (!isDisplayed())
|
||||
return false;
|
||||
|
||||
if (getDisplayLogic() == null || getDisplayLogic().trim().length() == 0)
|
||||
return true;
|
||||
|
||||
Evaluatee evaluatee = new Evaluatee() {
|
||||
public String get_ValueAsString(String variableName) {
|
||||
return Env.getContext (ctx, windowNo, variableName, true);
|
||||
}
|
||||
};
|
||||
|
||||
boolean retValue = Evaluator.evaluateLogic(evaluatee, getDisplayLogic());
|
||||
return retValue;
|
||||
}
|
||||
|
||||
public String getColumnName() {
|
||||
return ColumnName;
|
||||
}
|
||||
|
||||
public boolean isMandatory() {
|
||||
return isMandatory;
|
||||
}
|
||||
|
||||
public boolean isQueryCriteria() {
|
||||
return isQueryCriteria;
|
||||
}
|
||||
|
||||
public String getNameTrl() {
|
||||
return NameTrl;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return Name;
|
||||
}
|
||||
|
||||
public int getAD_Reference_ID() {
|
||||
return AD_Reference_ID;
|
||||
}
|
||||
|
||||
public int getAD_Reference_Value_ID() {
|
||||
return AD_Reference_Value_ID;
|
||||
}
|
||||
|
||||
public String getPlaceHolderTrl() {
|
||||
return PlaceHolderTrl;
|
||||
}
|
||||
|
||||
public String getPlaceholder() {
|
||||
return Placeholder;
|
||||
}
|
||||
|
||||
public boolean isReadOnly() {
|
||||
return isReadOnly;
|
||||
}
|
||||
|
||||
public String getSelectClause() {
|
||||
return SelectClause;
|
||||
}
|
||||
|
||||
public String getDisplayLogic() {
|
||||
return DisplayLogic;
|
||||
}
|
||||
|
||||
public boolean isDisplayed() {
|
||||
return isDisplayed;
|
||||
}
|
||||
|
||||
public String getInputFieldValidation() {
|
||||
return InputFieldValidation;
|
||||
}
|
||||
|
||||
public boolean isIdentifier() {
|
||||
return isIdentifier;
|
||||
}
|
||||
|
||||
public String getQueryOperator() {
|
||||
return QueryOperator;
|
||||
}
|
||||
|
||||
public int getSeqNoSelection() {
|
||||
return SeqNoSelection;
|
||||
}
|
||||
|
||||
public String getQueryFunction() {
|
||||
return QueryFunction;
|
||||
}
|
||||
|
||||
public boolean isKey() {
|
||||
return isKey;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return Description;
|
||||
}
|
||||
|
||||
public String getDescriptionTrl() {
|
||||
return DescriptionTrl;
|
||||
}
|
||||
|
||||
public MInfoColumn getAD_InfoColumn() {
|
||||
return infoColumn;
|
||||
}
|
||||
|
||||
public int getAD_Val_Rule_ID() {
|
||||
return AD_Val_Rule_ID;
|
||||
}
|
||||
|
||||
public String getDefaultValue() {
|
||||
return DefaultValue;
|
||||
}
|
||||
|
||||
public String getHelpTrl() {
|
||||
return HelpTrl;
|
||||
}
|
||||
|
||||
public String getHelp() {
|
||||
return Help;
|
||||
}
|
||||
|
||||
public int getAD_FieldStyle_ID() {
|
||||
return AD_FieldStyle_ID;
|
||||
}
|
||||
|
||||
public boolean isAutocomplete() {
|
||||
return isAutocomplete;
|
||||
}
|
||||
|
||||
public int getAD_InfoColumn_ID() {
|
||||
return AD_InfoColumn_ID;
|
||||
}
|
||||
|
||||
public String getValidationCode() {
|
||||
return ValidationCode;
|
||||
}
|
||||
|
||||
public int getSeqNo() {
|
||||
return SeqNo;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,220 @@
|
|||
package org.compiere.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.model.IInfoColumn;
|
||||
import org.adempiere.model.MInfoRelated;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Evaluatee;
|
||||
import org.compiere.util.Evaluator;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
* Info Related Value Object
|
||||
* @author Igor Pojzl, Cloudempiere
|
||||
* @version $Id$
|
||||
*/
|
||||
public class InfoRelatedVO implements Serializable, Cloneable, IInfoColumn {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 3683704870522235708L;
|
||||
|
||||
/** Logger */
|
||||
private static CLogger log = CLogger.getCLogger(InfoRelatedVO.class);
|
||||
|
||||
/** Properties */
|
||||
private Properties ctx;
|
||||
|
||||
private int AD_InfoRelated_ID;
|
||||
|
||||
private int AD_InfoWindow_ID;
|
||||
|
||||
private MInfoRelated infoRelated;
|
||||
|
||||
private int SeqNo;
|
||||
|
||||
private String DisplayLogic;
|
||||
|
||||
private String Name;
|
||||
|
||||
private int WindowNo;
|
||||
|
||||
/**
|
||||
* Default Constructor
|
||||
* @param ctx
|
||||
* @param infoColumn
|
||||
*/
|
||||
public InfoRelatedVO(Properties ctx, MInfoRelated infoRelated, int windowNo) {
|
||||
|
||||
this.ctx = ctx;
|
||||
|
||||
this.infoRelated = infoRelated;
|
||||
|
||||
this.AD_InfoRelated_ID = infoRelated.getAD_InfoRelated_ID();
|
||||
|
||||
this.AD_InfoWindow_ID = infoRelated.getAD_InfoWindow_ID();
|
||||
|
||||
this.SeqNo = infoRelated.getSeqNo();
|
||||
|
||||
this.DisplayLogic = infoRelated.getDisplayLogic();
|
||||
|
||||
MInfoWindow riw = (MInfoWindow) infoRelated.getRelatedInfo();
|
||||
if (riw != null)
|
||||
this.Name = Util.cleanAmp(riw.get_Translation("Name"));
|
||||
else
|
||||
this.Name = infoRelated.getName();
|
||||
|
||||
this.WindowNo = windowNo;
|
||||
|
||||
this.afterCreate();
|
||||
}
|
||||
|
||||
public void afterCreate() {
|
||||
InfoRelatedVO vo = this;
|
||||
|
||||
// InfoColumn Customization
|
||||
MUserDefInfoRelated userDef = null;
|
||||
userDef = MUserDefInfoRelated.get(vo.ctx,vo.AD_InfoRelated_ID, vo.AD_InfoWindow_ID);
|
||||
if (userDef != null)
|
||||
{
|
||||
if (userDef.getName() != null)
|
||||
vo.Name = userDef.getName();
|
||||
if (userDef.get_Translation("Name") != null)
|
||||
vo.Name = userDef.get_Translation("Name");
|
||||
if (userDef.getSeqNo() > 0)
|
||||
vo.SeqNo= userDef.getSeqNo();
|
||||
if (userDef.getDisplayLogic() != null)
|
||||
vo.DisplayLogic = userDef.getDisplayLogic();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Default Constructor
|
||||
* @param ctx
|
||||
* @param infoColumn
|
||||
*/
|
||||
public static InfoRelatedVO[] getInfoRelatedVOList(Properties ctx, MInfoRelated[] infoRelatedList, int windowNo) {
|
||||
ArrayList<InfoRelatedVO> infoRelatedVOList = new ArrayList<InfoRelatedVO>();
|
||||
// Create Info Related VO
|
||||
for(MInfoRelated infoRelated : infoRelatedList) {
|
||||
InfoRelatedVO infoRelatedVO = new InfoRelatedVO(ctx, infoRelated, windowNo);
|
||||
infoRelatedVOList.add(infoRelatedVO);
|
||||
}
|
||||
|
||||
// Sort List By SeqNo
|
||||
infoRelatedVOList.sort(new Comparator<InfoRelatedVO>() {
|
||||
|
||||
@Override
|
||||
public int compare(InfoRelatedVO o1, InfoRelatedVO o2) {
|
||||
Integer o1SeqNo = Integer.valueOf(o1.getSeqNo());
|
||||
Integer o2SeqNo = Integer.valueOf(o2.getSeqNo());
|
||||
return o1SeqNo.compareTo(o2SeqNo);
|
||||
}
|
||||
});
|
||||
|
||||
return infoRelatedVOList.toArray(new InfoRelatedVO[infoRelatedVOList.size()]);
|
||||
}
|
||||
|
||||
public int getRelatedInfo_ID() {
|
||||
return infoRelated.getRelatedInfo_ID();
|
||||
}
|
||||
|
||||
public String getLinkColumnName() {
|
||||
return infoRelated.getLinkColumnName();
|
||||
}
|
||||
|
||||
public int getParentRelatedColumn_ID() {
|
||||
return infoRelated.getParentRelatedColumn_ID();
|
||||
}
|
||||
|
||||
public I_AD_InfoWindow getRelatedInfo() {
|
||||
return infoRelated.getRelatedInfo();
|
||||
}
|
||||
|
||||
public MInfoColumn getLinkInfoColumn() {
|
||||
return infoRelated.getLinkInfoColumn();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return Name;
|
||||
}
|
||||
|
||||
public I_AD_InfoColumn getParentRelatedColumn() {
|
||||
return infoRelated.getParentRelatedColumn();
|
||||
}
|
||||
|
||||
public int getSeqNo() {
|
||||
return this.SeqNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Just forward call to {@link #getParentRelatedColumn_ID()}
|
||||
*/
|
||||
@Override
|
||||
public int getInfoColumnID() {
|
||||
return getParentRelatedColumn_ID();
|
||||
}
|
||||
|
||||
/**
|
||||
* Just forward call to {@link #getParentRelatedColumn()}
|
||||
*/
|
||||
@Override
|
||||
public MInfoColumn getAD_InfoColumn (){
|
||||
return (MInfoColumn) getParentRelatedColumn();
|
||||
}
|
||||
|
||||
public String getDisplayLogic() {
|
||||
return DisplayLogic;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Is the Related Window Visible ?
|
||||
* @return true, if visible
|
||||
*/
|
||||
public boolean isDisplayed (final Properties ctx)
|
||||
{
|
||||
// no restrictions
|
||||
if (Util.isEmpty(getDisplayLogic()))
|
||||
return true;
|
||||
|
||||
if (getDisplayLogic().startsWith("@SQL=")) {
|
||||
return Evaluator.parseSQLLogic(DisplayLogic, ctx, WindowNo, 0, infoRelated.toString());
|
||||
}
|
||||
Evaluatee evaluatee = new Evaluatee() {
|
||||
public String get_ValueAsString(String variableName) {
|
||||
return InfoRelatedVO.this.get_ValueAsString(ctx, variableName);
|
||||
}
|
||||
};
|
||||
boolean retValue = Evaluator.evaluateLogic(evaluatee, getDisplayLogic());
|
||||
if (log.isLoggable(Level.FINEST)) log.finest(infoRelated.toString()
|
||||
+ " (" + getDisplayLogic() + ") => " + retValue);
|
||||
return retValue;
|
||||
|
||||
} // isDisplayed
|
||||
|
||||
|
||||
/**
|
||||
* Get Variable Value (Evaluatee)
|
||||
* @param variableName name
|
||||
* @return value
|
||||
*/
|
||||
public String get_ValueAsString (Properties ctx, String variableName)
|
||||
{
|
||||
int f = variableName.indexOf('.');
|
||||
if (f > 0) {
|
||||
variableName = variableName.substring(0, f);
|
||||
}
|
||||
|
||||
String value = null;
|
||||
value = Env.getContext (ctx, WindowNo, variableName, true);
|
||||
|
||||
return value;
|
||||
} // get_ValueAsString
|
||||
}
|
|
@ -622,8 +622,20 @@ public class MTree extends MTree_Base
|
|||
access = role.getWorkflowAccess(AD_Workflow_ID);
|
||||
else if (X_AD_Menu.ACTION_Task.equals(actionColor))
|
||||
access = role.getTaskAccess(AD_Task_ID);
|
||||
else if (X_AD_Menu.ACTION_Info.equals(actionColor))
|
||||
else if (X_AD_Menu.ACTION_Info.equals(actionColor)) {
|
||||
access = role.getInfoAccess(AD_InfoWindow_ID);
|
||||
|
||||
// Get Info Window Customization
|
||||
MUserDefInfo userDef = null;
|
||||
userDef = MUserDefInfo.getBestMatch(getCtx(), AD_InfoWindow_ID);
|
||||
if (userDef != null)
|
||||
{
|
||||
if (userDef.getName() != null)
|
||||
name = userDef.getName();
|
||||
if (userDef.getDescription() != null)
|
||||
description = userDef.getDescription();
|
||||
}
|
||||
}
|
||||
// log.fine("getNodeDetail - " + name + " - " + actionColor + " - " + access);
|
||||
//
|
||||
if (access != null // rw or ro for Role
|
||||
|
|
|
@ -0,0 +1,222 @@
|
|||
/**********************************************************************
|
||||
* This file is part of iDempiere ERP Open Source *
|
||||
* http://www.idempiere.org *
|
||||
* *
|
||||
* Copyright (C) Contributors *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation; either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||
* MA 02110-1301, USA. *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Igor Pojzl, Cloudempiere *
|
||||
**********************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.compiere.util.CCache;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
* User overrides for Info Window Model
|
||||
* @author Igor Pojzl, Cloudempiere
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MUserDefInfo extends X_AD_UserDef_Info {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 5611033457579880793L;
|
||||
|
||||
private volatile static List<MUserDefInfo> m_fullList = null;
|
||||
|
||||
/**
|
||||
* Standard constructor.
|
||||
* You must implement this constructor for Adempiere Persistency
|
||||
* @param ctx Context
|
||||
* @param AD_UserDef_Info_ID Primary Key ID
|
||||
* @param trxName Transaction name
|
||||
*/
|
||||
public MUserDefInfo(Properties ctx, int AD_UserDef_Info_ID, String trxName) {
|
||||
super(ctx, AD_UserDef_Info_ID, trxName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Optional Load Constructor.
|
||||
* You would use this constructor to load several business objects.
|
||||
* <code>
|
||||
* SELECT * FROM MyModelExample WHERE ...
|
||||
* </code>
|
||||
* @param ctx Context
|
||||
* @param rs Result set
|
||||
* @param trxName Transaction name
|
||||
*/
|
||||
public MUserDefInfo(Properties ctx, ResultSet rs, String trxName) {
|
||||
super(ctx, rs, trxName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all MUserDefInfo entries related to info window
|
||||
* @param ctx Context
|
||||
* @param infowindow_ID Info window
|
||||
* @return Array of MUserDefInfo for window
|
||||
*/
|
||||
private static MUserDefInfo[] getAll (Properties ctx, int infowindow_ID )
|
||||
{
|
||||
if (m_fullList == null) {
|
||||
m_fullList = new Query(ctx, MUserDefInfo.Table_Name, "IsActive='Y'", null).list();
|
||||
}
|
||||
|
||||
if (m_fullList.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<MUserDefInfo> list = new ArrayList<MUserDefInfo>();
|
||||
|
||||
for (MUserDefInfo udw : m_fullList) {
|
||||
if (udw.getAD_InfoWindow_ID() == infowindow_ID
|
||||
&& udw.getAD_Client_ID() == Env.getAD_Client_ID(ctx)
|
||||
&& (udw.getAD_Language() == null || udw.getAD_Language().equals(Env.getAD_Language(ctx)))
|
||||
) {
|
||||
list.add(udw);
|
||||
}
|
||||
}
|
||||
|
||||
if (list.size() == 0)
|
||||
return null;
|
||||
|
||||
return list.toArray(new MUserDefInfo[list.size()]);
|
||||
} //getAll
|
||||
|
||||
/**
|
||||
* Get best matching MUserDefWin for current window
|
||||
* the best match is cached
|
||||
* @param ctx
|
||||
* @param infowindow_ID
|
||||
* @return best matching MUserDefWin
|
||||
*/
|
||||
public static MUserDefInfo getBestMatch (Properties ctx, int infowindow_ID)
|
||||
{
|
||||
// parameters
|
||||
final int AD_Org_ID = Env.getAD_Org_ID(ctx);
|
||||
final int AD_Role_ID = Env.getAD_Role_ID(ctx);
|
||||
final int AD_User_ID = Env.getAD_User_ID(ctx);
|
||||
|
||||
// Check Cache
|
||||
String key = new StringBuilder().append(infowindow_ID).append("_")
|
||||
.append(Env.getAD_Client_ID(ctx)).append("_")
|
||||
.append(Env.getAD_Language(ctx)).append("_")
|
||||
.append(AD_Org_ID).append("_")
|
||||
.append(AD_Role_ID).append("_")
|
||||
.append(AD_User_ID)
|
||||
.toString();
|
||||
if (s_cache.containsKey(key))
|
||||
return s_cache.get(key);
|
||||
|
||||
// candidates
|
||||
MUserDefInfo[] candidates = getAll(ctx, infowindow_ID);
|
||||
if (candidates == null) {
|
||||
s_cache.put(key, null);
|
||||
return null;
|
||||
}
|
||||
final int size = candidates.length;
|
||||
int[] weight = new int[size];
|
||||
|
||||
// this user + this role + this org => weight = 7
|
||||
// this user + this role + any org => weight = 6
|
||||
// this user + any role + this org => weight = 5
|
||||
// this user + any role + any org => weight = 4
|
||||
// any user + this role + this org => weight = 3
|
||||
// any user + this role + any org => weight = 2
|
||||
// any user + any role + this org => weight = 1
|
||||
// any user + any role + any org => weight = 0
|
||||
// other user or other role or other org => weight = -1 and thus ruled out
|
||||
for (int i=0; i < size; i++)
|
||||
{
|
||||
weight[i] = 0;
|
||||
if (candidates[i].getAD_User_ID() > 0) {
|
||||
if (candidates[i].getAD_User_ID() == AD_User_ID) {
|
||||
weight[i] = weight[i] + 4;
|
||||
} else {
|
||||
weight[i] = -1;
|
||||
}
|
||||
}
|
||||
if (weight[i] > -1 && candidates[i].getAD_Role_ID() > 0) {
|
||||
if (candidates[i].getAD_Role_ID() == AD_Role_ID) {
|
||||
weight[i] = weight[i] + 2;
|
||||
} else {
|
||||
weight[i] = -1;
|
||||
}
|
||||
}
|
||||
if (weight[i] > -1 && candidates[i].getAD_Org_ID() > 0) {
|
||||
if (candidates[i].getAD_Org_ID() == AD_Org_ID) {
|
||||
weight[i] = weight[i] + 1;
|
||||
} else {
|
||||
weight[i] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (weight[i] > -1 && !Util.isEmpty(candidates[i].getAD_Language())) {
|
||||
if(Env.getAD_Language(ctx).equalsIgnoreCase(candidates[i].getAD_Language())) {
|
||||
weight[i] = weight[i] + 8;
|
||||
}
|
||||
else {
|
||||
weight[i] = -1;
|
||||
}
|
||||
}
|
||||
// others are implicit
|
||||
}
|
||||
|
||||
int maximum = weight[0]; // start with the first value
|
||||
int maxindex = 0;
|
||||
for (int j=0; j<weight.length; j++) {
|
||||
if (weight[j] > maximum) {
|
||||
maximum = weight[j]; // new maximum
|
||||
maxindex = j;
|
||||
}
|
||||
}
|
||||
|
||||
if (weight[maxindex] > -1) {
|
||||
MUserDefInfo retValue = null;
|
||||
retValue=candidates[maxindex];
|
||||
s_cache.put(key, retValue);
|
||||
return retValue;
|
||||
} else {
|
||||
s_cache.put(key, null);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/** Cache of selected MUserDefInfo entries **/
|
||||
private static CCache<String,MUserDefInfo> s_cache = new CCache<String,MUserDefInfo>(Table_Name, 3); // 3 weights
|
||||
|
||||
@Override
|
||||
protected boolean beforeSave(boolean newRecord) {
|
||||
m_fullList = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean beforeDelete() {
|
||||
m_fullList = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
/**********************************************************************
|
||||
* This file is part of iDempiere ERP Open Source *
|
||||
* http://www.idempiere.org *
|
||||
* *
|
||||
* Copyright (C) Contributors *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation; either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||
* MA 02110-1301, USA. *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Igor Pojzl, Cloudempiere *
|
||||
**********************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DB;
|
||||
|
||||
/**
|
||||
* User overrides for Info Window Column Model
|
||||
* @author Igor Pojzl, Cloudempiere
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MUserDefInfoColumn extends X_AD_UserDef_Info_Column {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -4381444937794716616L;
|
||||
|
||||
/**
|
||||
* Standard constructor.
|
||||
* You must implement this constructor for Adempiere Persistency
|
||||
* @param ctx Context
|
||||
* @param AD_UserDef_Info_Column_ID Primary key ID
|
||||
* @param trxName Transaction name
|
||||
*/
|
||||
public MUserDefInfoColumn(Properties ctx, int AD_UserDef_Info_Column_ID, String trxName) {
|
||||
super(ctx, AD_UserDef_Info_Column_ID, trxName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Optional Load Constructor.
|
||||
* You would use this constructor to load several business objects.
|
||||
* <code>
|
||||
* SELECT * FROM MyModelExample WHERE ...
|
||||
* </code>
|
||||
* @param ctx Context
|
||||
* @param rs Result set
|
||||
* @param trxName Transaction Name
|
||||
*/
|
||||
public MUserDefInfoColumn(Properties ctx, ResultSet rs, String trxName) {
|
||||
super(ctx, rs, trxName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get matching MUserDefInfoColumn related to current Info Column and user definition for Info window
|
||||
* @param ctx
|
||||
* @param AD_InfoColumn_ID
|
||||
* @param AD_InfoWindow_ID
|
||||
* @return
|
||||
*/
|
||||
public static MUserDefInfoColumn get (Properties ctx, int AD_InfoColumn_ID, int AD_InfoWindow_ID )
|
||||
{
|
||||
|
||||
MUserDefInfo userdefInfo = MUserDefInfo.getBestMatch(ctx, AD_InfoWindow_ID);
|
||||
if (userdefInfo == null)
|
||||
return null;
|
||||
|
||||
MUserDefInfoColumn retValue = null;
|
||||
|
||||
StringBuilder sql = new StringBuilder("SELECT * "
|
||||
+ " FROM AD_UserDef_Info_Column c "
|
||||
+ " WHERE c.AD_InfoColumn_ID=? AND c.IsActive='Y' "
|
||||
+ " AND c.AD_UserDef_Info_ID=? ");
|
||||
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
{
|
||||
// create statement
|
||||
pstmt = DB.prepareStatement(sql.toString(), null);
|
||||
pstmt.setInt(1, AD_InfoColumn_ID);
|
||||
pstmt.setInt(2, userdefInfo.getAD_UserDef_Info_ID());
|
||||
// get data
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next())
|
||||
{
|
||||
retValue = new MUserDefInfoColumn(ctx,rs,null);
|
||||
}
|
||||
}
|
||||
catch (SQLException ex)
|
||||
{
|
||||
CLogger.get().log(Level.SEVERE, sql.toString(), ex);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
DB.close(rs, pstmt);
|
||||
rs = null;
|
||||
pstmt = null;
|
||||
}
|
||||
|
||||
return retValue;
|
||||
} //get
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/**********************************************************************
|
||||
* This file is part of iDempiere ERP Open Source *
|
||||
* http://www.idempiere.org *
|
||||
* *
|
||||
* Copyright (C) Contributors *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation; either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||
* MA 02110-1301, USA. *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Igor Pojzl, Cloudempiere *
|
||||
**********************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DB;
|
||||
|
||||
/**
|
||||
* User overrides for Info Window Related Model
|
||||
* @author Igor Pojzl, Cloudempiere
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MUserDefInfoRelated extends X_AD_UserDef_Info_Related {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -2317004482077725245L;
|
||||
|
||||
public MUserDefInfoRelated(Properties ctx, int AD_UserDef_Info_Related_ID, String trxName) {
|
||||
super(ctx, AD_UserDef_Info_Related_ID, trxName);
|
||||
}
|
||||
public MUserDefInfoRelated(Properties ctx, ResultSet rs, String trxName) {
|
||||
super(ctx, rs, trxName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get matching MUserDefInfoRelated related to current Info Column and user definition for Info window
|
||||
* @param ctx
|
||||
* @param AD_InfoRelated_ID
|
||||
* @param AD_InfoWindow_ID
|
||||
* @return
|
||||
*/
|
||||
public static MUserDefInfoRelated get (Properties ctx, int AD_InfoRelated_ID, int AD_InfoWindow_ID )
|
||||
{
|
||||
|
||||
MUserDefInfo userdefInfo = MUserDefInfo.getBestMatch(ctx, AD_InfoWindow_ID);
|
||||
if (userdefInfo == null)
|
||||
return null;
|
||||
|
||||
MUserDefInfoRelated retValue = null;
|
||||
|
||||
StringBuilder sql = new StringBuilder("SELECT * "
|
||||
+ " FROM AD_UserDef_Info_Related c "
|
||||
+ " WHERE c.AD_InfoRelated_ID=? AND c.IsActive='Y' "
|
||||
+ " AND c.AD_UserDef_Info_ID=? ");
|
||||
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
{
|
||||
// create statement
|
||||
pstmt = DB.prepareStatement(sql.toString(), null);
|
||||
pstmt.setInt(1, AD_InfoRelated_ID);
|
||||
pstmt.setInt(2, userdefInfo.getAD_UserDef_Info_ID());
|
||||
// get data
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next())
|
||||
{
|
||||
retValue = new MUserDefInfoRelated(ctx,rs,null);
|
||||
}
|
||||
}
|
||||
catch (SQLException ex)
|
||||
{
|
||||
CLogger.get().log(Level.SEVERE, sql.toString(), ex);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
DB.close(rs, pstmt);
|
||||
rs = null;
|
||||
pstmt = null;
|
||||
}
|
||||
|
||||
return retValue;
|
||||
} //get
|
||||
}
|
|
@ -30,7 +30,7 @@ public class X_AD_InfoRelated extends PO implements I_AD_InfoRelated, I_Persiste
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20200413L;
|
||||
private static final long serialVersionUID = 20201015L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_InfoRelated (Properties ctx, int AD_InfoRelated_ID, String trxName)
|
||||
|
@ -158,6 +158,23 @@ public class X_AD_InfoRelated extends PO implements I_AD_InfoRelated, I_Persiste
|
|||
return (String)get_Value(COLUMNNAME_Description);
|
||||
}
|
||||
|
||||
/** Set Display Logic.
|
||||
@param DisplayLogic
|
||||
If the Field is displayed, the result determines if the field is actually displayed
|
||||
*/
|
||||
public void setDisplayLogic (String DisplayLogic)
|
||||
{
|
||||
set_Value (COLUMNNAME_DisplayLogic, DisplayLogic);
|
||||
}
|
||||
|
||||
/** Get Display Logic.
|
||||
@return If the Field is displayed, the result determines if the field is actually displayed
|
||||
*/
|
||||
public String getDisplayLogic ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_DisplayLogic);
|
||||
}
|
||||
|
||||
/** EntityType AD_Reference_ID=389 */
|
||||
public static final int ENTITYTYPE_AD_Reference_ID=389;
|
||||
/** Set Entity Type.
|
||||
|
|
|
@ -0,0 +1,261 @@
|
|||
/******************************************************************************
|
||||
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software, you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
/** Generated Model - DO NOT CHANGE */
|
||||
package org.compiere.model;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
|
||||
/** Generated Model for AD_UserDef_Info
|
||||
* @author iDempiere (generated)
|
||||
* @version Release 7.1 - $Id$ */
|
||||
public class X_AD_UserDef_Info extends PO implements I_AD_UserDef_Info, I_Persistent
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20201006L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_UserDef_Info (Properties ctx, int AD_UserDef_Info_ID, String trxName)
|
||||
{
|
||||
super (ctx, AD_UserDef_Info_ID, trxName);
|
||||
/** if (AD_UserDef_Info_ID == 0)
|
||||
{
|
||||
setAD_InfoWindow_ID (0);
|
||||
setAD_UserDef_Info_ID (0);
|
||||
} */
|
||||
}
|
||||
|
||||
/** Load Constructor */
|
||||
public X_AD_UserDef_Info (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super (ctx, rs, trxName);
|
||||
}
|
||||
|
||||
/** AccessLevel
|
||||
* @return 6 - System - Client
|
||||
*/
|
||||
protected int get_AccessLevel()
|
||||
{
|
||||
return accessLevel.intValue();
|
||||
}
|
||||
|
||||
/** Load Meta Data */
|
||||
protected POInfo initPO (Properties ctx)
|
||||
{
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||
return poi;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder ("X_AD_UserDef_Info[")
|
||||
.append(get_ID()).append(",Name=").append(getName()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_InfoWindow getAD_InfoWindow() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_InfoWindow)MTable.get(getCtx(), org.compiere.model.I_AD_InfoWindow.Table_Name)
|
||||
.getPO(getAD_InfoWindow_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Info Window.
|
||||
@param AD_InfoWindow_ID
|
||||
Info and search/select Window
|
||||
*/
|
||||
public void setAD_InfoWindow_ID (int AD_InfoWindow_ID)
|
||||
{
|
||||
if (AD_InfoWindow_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_AD_InfoWindow_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_AD_InfoWindow_ID, Integer.valueOf(AD_InfoWindow_ID));
|
||||
}
|
||||
|
||||
/** Get Info Window.
|
||||
@return Info and search/select Window
|
||||
*/
|
||||
public int getAD_InfoWindow_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_InfoWindow_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** AD_Language AD_Reference_ID=106 */
|
||||
public static final int AD_LANGUAGE_AD_Reference_ID=106;
|
||||
/** Set Language.
|
||||
@param AD_Language
|
||||
Language for this entity
|
||||
*/
|
||||
public void setAD_Language (String AD_Language)
|
||||
{
|
||||
|
||||
set_Value (COLUMNNAME_AD_Language, AD_Language);
|
||||
}
|
||||
|
||||
/** Get Language.
|
||||
@return Language for this entity
|
||||
*/
|
||||
public String getAD_Language ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_AD_Language);
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_Role getAD_Role() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_Role)MTable.get(getCtx(), org.compiere.model.I_AD_Role.Table_Name)
|
||||
.getPO(getAD_Role_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Role.
|
||||
@param AD_Role_ID
|
||||
Responsibility Role
|
||||
*/
|
||||
public void setAD_Role_ID (int AD_Role_ID)
|
||||
{
|
||||
if (AD_Role_ID < 0)
|
||||
set_Value (COLUMNNAME_AD_Role_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_AD_Role_ID, Integer.valueOf(AD_Role_ID));
|
||||
}
|
||||
|
||||
/** Get Role.
|
||||
@return Responsibility Role
|
||||
*/
|
||||
public int getAD_Role_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Role_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set User defined Info Window.
|
||||
@param AD_UserDef_Info_ID User defined Info Window */
|
||||
public void setAD_UserDef_Info_ID (int AD_UserDef_Info_ID)
|
||||
{
|
||||
if (AD_UserDef_Info_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_AD_UserDef_Info_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_AD_UserDef_Info_ID, Integer.valueOf(AD_UserDef_Info_ID));
|
||||
}
|
||||
|
||||
/** Get User defined Info Window.
|
||||
@return User defined Info Window */
|
||||
public int getAD_UserDef_Info_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_UserDef_Info_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set AD_UserDef_Info_UU.
|
||||
@param AD_UserDef_Info_UU AD_UserDef_Info_UU */
|
||||
public void setAD_UserDef_Info_UU (String AD_UserDef_Info_UU)
|
||||
{
|
||||
set_ValueNoCheck (COLUMNNAME_AD_UserDef_Info_UU, AD_UserDef_Info_UU);
|
||||
}
|
||||
|
||||
/** Get AD_UserDef_Info_UU.
|
||||
@return AD_UserDef_Info_UU */
|
||||
public String getAD_UserDef_Info_UU ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_AD_UserDef_Info_UU);
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_User getAD_User() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name)
|
||||
.getPO(getAD_User_ID(), get_TrxName()); }
|
||||
|
||||
/** Set User/Contact.
|
||||
@param AD_User_ID
|
||||
User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public void setAD_User_ID (int AD_User_ID)
|
||||
{
|
||||
if (AD_User_ID < 1)
|
||||
set_Value (COLUMNNAME_AD_User_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID));
|
||||
}
|
||||
|
||||
/** Get User/Contact.
|
||||
@return User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public int getAD_User_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Description.
|
||||
@param Description
|
||||
Optional short description of the record
|
||||
*/
|
||||
public void setDescription (String Description)
|
||||
{
|
||||
set_Value (COLUMNNAME_Description, Description);
|
||||
}
|
||||
|
||||
/** Get Description.
|
||||
@return Optional short description of the record
|
||||
*/
|
||||
public String getDescription ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Description);
|
||||
}
|
||||
|
||||
/** Set Comment/Help.
|
||||
@param Help
|
||||
Comment or Hint
|
||||
*/
|
||||
public void setHelp (String Help)
|
||||
{
|
||||
set_Value (COLUMNNAME_Help, Help);
|
||||
}
|
||||
|
||||
/** Get Comment/Help.
|
||||
@return Comment or Hint
|
||||
*/
|
||||
public String getHelp ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Help);
|
||||
}
|
||||
|
||||
/** Set Name.
|
||||
@param Name
|
||||
Alphanumeric identifier of the entity
|
||||
*/
|
||||
public void setName (String Name)
|
||||
{
|
||||
set_Value (COLUMNNAME_Name, Name);
|
||||
}
|
||||
|
||||
/** Get Name.
|
||||
@return Alphanumeric identifier of the entity
|
||||
*/
|
||||
public String getName ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Name);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,602 @@
|
|||
/******************************************************************************
|
||||
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software, you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
/** Generated Model - DO NOT CHANGE */
|
||||
package org.compiere.model;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
|
||||
/** Generated Model for AD_UserDef_Info_Column
|
||||
* @author iDempiere (generated)
|
||||
* @version Release 7.1 - $Id$ */
|
||||
public class X_AD_UserDef_Info_Column extends PO implements I_AD_UserDef_Info_Column, I_Persistent
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20201011L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_UserDef_Info_Column (Properties ctx, int AD_UserDef_Info_Column_ID, String trxName)
|
||||
{
|
||||
super (ctx, AD_UserDef_Info_Column_ID, trxName);
|
||||
/** if (AD_UserDef_Info_Column_ID == 0)
|
||||
{
|
||||
setAD_InfoColumn_ID (0);
|
||||
setAD_UserDef_Info_Column_ID (0);
|
||||
setAD_UserDef_Info_ID (0);
|
||||
// @AD_UserDef_Info_ID@
|
||||
} */
|
||||
}
|
||||
|
||||
/** Load Constructor */
|
||||
public X_AD_UserDef_Info_Column (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super (ctx, rs, trxName);
|
||||
}
|
||||
|
||||
/** AccessLevel
|
||||
* @return 6 - System - Client
|
||||
*/
|
||||
protected int get_AccessLevel()
|
||||
{
|
||||
return accessLevel.intValue();
|
||||
}
|
||||
|
||||
/** Load Meta Data */
|
||||
protected POInfo initPO (Properties ctx)
|
||||
{
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||
return poi;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder ("X_AD_UserDef_Info_Column[")
|
||||
.append(get_ID()).append(",Name=").append(getName()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_Style getAD_FieldStyle() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_Style)MTable.get(getCtx(), org.compiere.model.I_AD_Style.Table_Name)
|
||||
.getPO(getAD_FieldStyle_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Field Style.
|
||||
@param AD_FieldStyle_ID
|
||||
Field CSS Style
|
||||
*/
|
||||
public void setAD_FieldStyle_ID (int AD_FieldStyle_ID)
|
||||
{
|
||||
if (AD_FieldStyle_ID < 1)
|
||||
set_Value (COLUMNNAME_AD_FieldStyle_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_AD_FieldStyle_ID, Integer.valueOf(AD_FieldStyle_ID));
|
||||
}
|
||||
|
||||
/** Get Field Style.
|
||||
@return Field CSS Style
|
||||
*/
|
||||
public int getAD_FieldStyle_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_FieldStyle_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_InfoColumn getAD_InfoColumn() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_InfoColumn)MTable.get(getCtx(), org.compiere.model.I_AD_InfoColumn.Table_Name)
|
||||
.getPO(getAD_InfoColumn_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Info Column.
|
||||
@param AD_InfoColumn_ID
|
||||
Info Window Column
|
||||
*/
|
||||
public void setAD_InfoColumn_ID (int AD_InfoColumn_ID)
|
||||
{
|
||||
if (AD_InfoColumn_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_AD_InfoColumn_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_AD_InfoColumn_ID, Integer.valueOf(AD_InfoColumn_ID));
|
||||
}
|
||||
|
||||
/** Get Info Column.
|
||||
@return Info Window Column
|
||||
*/
|
||||
public int getAD_InfoColumn_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_InfoColumn_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_Reference getAD_Reference() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_Reference)MTable.get(getCtx(), org.compiere.model.I_AD_Reference.Table_Name)
|
||||
.getPO(getAD_Reference_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Reference.
|
||||
@param AD_Reference_ID
|
||||
System Reference and Validation
|
||||
*/
|
||||
public void setAD_Reference_ID (int AD_Reference_ID)
|
||||
{
|
||||
if (AD_Reference_ID < 1)
|
||||
set_Value (COLUMNNAME_AD_Reference_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_AD_Reference_ID, Integer.valueOf(AD_Reference_ID));
|
||||
}
|
||||
|
||||
/** Get Reference.
|
||||
@return System Reference and Validation
|
||||
*/
|
||||
public int getAD_Reference_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Reference_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_Reference getAD_Reference_Value() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_Reference)MTable.get(getCtx(), org.compiere.model.I_AD_Reference.Table_Name)
|
||||
.getPO(getAD_Reference_Value_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Reference Key.
|
||||
@param AD_Reference_Value_ID
|
||||
Required to specify, if data type is Table or List
|
||||
*/
|
||||
public void setAD_Reference_Value_ID (int AD_Reference_Value_ID)
|
||||
{
|
||||
if (AD_Reference_Value_ID < 1)
|
||||
set_Value (COLUMNNAME_AD_Reference_Value_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_AD_Reference_Value_ID, Integer.valueOf(AD_Reference_Value_ID));
|
||||
}
|
||||
|
||||
/** Get Reference Key.
|
||||
@return Required to specify, if data type is Table or List
|
||||
*/
|
||||
public int getAD_Reference_Value_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Reference_Value_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set User defined Info Column.
|
||||
@param AD_UserDef_Info_Column_ID User defined Info Column */
|
||||
public void setAD_UserDef_Info_Column_ID (int AD_UserDef_Info_Column_ID)
|
||||
{
|
||||
if (AD_UserDef_Info_Column_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_AD_UserDef_Info_Column_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_AD_UserDef_Info_Column_ID, Integer.valueOf(AD_UserDef_Info_Column_ID));
|
||||
}
|
||||
|
||||
/** Get User defined Info Column.
|
||||
@return User defined Info Column */
|
||||
public int getAD_UserDef_Info_Column_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_UserDef_Info_Column_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set AD_UserDef_Info_Column_UU.
|
||||
@param AD_UserDef_Info_Column_UU AD_UserDef_Info_Column_UU */
|
||||
public void setAD_UserDef_Info_Column_UU (String AD_UserDef_Info_Column_UU)
|
||||
{
|
||||
set_ValueNoCheck (COLUMNNAME_AD_UserDef_Info_Column_UU, AD_UserDef_Info_Column_UU);
|
||||
}
|
||||
|
||||
/** Get AD_UserDef_Info_Column_UU.
|
||||
@return AD_UserDef_Info_Column_UU */
|
||||
public String getAD_UserDef_Info_Column_UU ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_AD_UserDef_Info_Column_UU);
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_UserDef_Info getAD_UserDef_Info() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_UserDef_Info)MTable.get(getCtx(), org.compiere.model.I_AD_UserDef_Info.Table_Name)
|
||||
.getPO(getAD_UserDef_Info_ID(), get_TrxName()); }
|
||||
|
||||
/** Set User defined Info Window.
|
||||
@param AD_UserDef_Info_ID User defined Info Window */
|
||||
public void setAD_UserDef_Info_ID (int AD_UserDef_Info_ID)
|
||||
{
|
||||
if (AD_UserDef_Info_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_AD_UserDef_Info_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_AD_UserDef_Info_ID, Integer.valueOf(AD_UserDef_Info_ID));
|
||||
}
|
||||
|
||||
/** Get User defined Info Window.
|
||||
@return User defined Info Window */
|
||||
public int getAD_UserDef_Info_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_UserDef_Info_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_Val_Rule getAD_Val_Rule() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_Val_Rule)MTable.get(getCtx(), org.compiere.model.I_AD_Val_Rule.Table_Name)
|
||||
.getPO(getAD_Val_Rule_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Dynamic Validation.
|
||||
@param AD_Val_Rule_ID
|
||||
Dynamic Validation Rule
|
||||
*/
|
||||
public void setAD_Val_Rule_ID (int AD_Val_Rule_ID)
|
||||
{
|
||||
if (AD_Val_Rule_ID < 1)
|
||||
set_Value (COLUMNNAME_AD_Val_Rule_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_AD_Val_Rule_ID, Integer.valueOf(AD_Val_Rule_ID));
|
||||
}
|
||||
|
||||
/** Get Dynamic Validation.
|
||||
@return Dynamic Validation Rule
|
||||
*/
|
||||
public int getAD_Val_Rule_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Val_Rule_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Default Logic.
|
||||
@param DefaultValue
|
||||
Default value hierarchy, separated by ;
|
||||
*/
|
||||
public void setDefaultValue (String DefaultValue)
|
||||
{
|
||||
set_Value (COLUMNNAME_DefaultValue, DefaultValue);
|
||||
}
|
||||
|
||||
/** Get Default Logic.
|
||||
@return Default value hierarchy, separated by ;
|
||||
*/
|
||||
public String getDefaultValue ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_DefaultValue);
|
||||
}
|
||||
|
||||
/** Set Description.
|
||||
@param Description
|
||||
Optional short description of the record
|
||||
*/
|
||||
public void setDescription (String Description)
|
||||
{
|
||||
set_Value (COLUMNNAME_Description, Description);
|
||||
}
|
||||
|
||||
/** Get Description.
|
||||
@return Optional short description of the record
|
||||
*/
|
||||
public String getDescription ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Description);
|
||||
}
|
||||
|
||||
/** Set Display Logic.
|
||||
@param DisplayLogic
|
||||
If the Field is displayed, the result determines if the field is actually displayed
|
||||
*/
|
||||
public void setDisplayLogic (String DisplayLogic)
|
||||
{
|
||||
set_Value (COLUMNNAME_DisplayLogic, DisplayLogic);
|
||||
}
|
||||
|
||||
/** Get Display Logic.
|
||||
@return If the Field is displayed, the result determines if the field is actually displayed
|
||||
*/
|
||||
public String getDisplayLogic ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_DisplayLogic);
|
||||
}
|
||||
|
||||
/** Set Comment/Help.
|
||||
@param Help
|
||||
Comment or Hint
|
||||
*/
|
||||
public void setHelp (String Help)
|
||||
{
|
||||
set_Value (COLUMNNAME_Help, Help);
|
||||
}
|
||||
|
||||
/** Get Comment/Help.
|
||||
@return Comment or Hint
|
||||
*/
|
||||
public String getHelp ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Help);
|
||||
}
|
||||
|
||||
/** Set Input field validation.
|
||||
@param InputFieldValidation
|
||||
Input field validaton query
|
||||
*/
|
||||
public void setInputFieldValidation (String InputFieldValidation)
|
||||
{
|
||||
set_Value (COLUMNNAME_InputFieldValidation, InputFieldValidation);
|
||||
}
|
||||
|
||||
/** Get Input field validation.
|
||||
@return Input field validaton query
|
||||
*/
|
||||
public String getInputFieldValidation ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_InputFieldValidation);
|
||||
}
|
||||
|
||||
/** IsAutocomplete AD_Reference_ID=319 */
|
||||
public static final int ISAUTOCOMPLETE_AD_Reference_ID=319;
|
||||
/** Yes = Y */
|
||||
public static final String ISAUTOCOMPLETE_Yes = "Y";
|
||||
/** No = N */
|
||||
public static final String ISAUTOCOMPLETE_No = "N";
|
||||
/** Set Autocomplete.
|
||||
@param IsAutocomplete
|
||||
Automatic completion for textfields
|
||||
*/
|
||||
public void setIsAutocomplete (String IsAutocomplete)
|
||||
{
|
||||
|
||||
set_Value (COLUMNNAME_IsAutocomplete, IsAutocomplete);
|
||||
}
|
||||
|
||||
/** Get Autocomplete.
|
||||
@return Automatic completion for textfields
|
||||
*/
|
||||
public String getIsAutocomplete ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_IsAutocomplete);
|
||||
}
|
||||
|
||||
/** IsDisplayed AD_Reference_ID=319 */
|
||||
public static final int ISDISPLAYED_AD_Reference_ID=319;
|
||||
/** Yes = Y */
|
||||
public static final String ISDISPLAYED_Yes = "Y";
|
||||
/** No = N */
|
||||
public static final String ISDISPLAYED_No = "N";
|
||||
/** Set Displayed.
|
||||
@param IsDisplayed
|
||||
Determines, if this field is displayed
|
||||
*/
|
||||
public void setIsDisplayed (String IsDisplayed)
|
||||
{
|
||||
|
||||
set_Value (COLUMNNAME_IsDisplayed, IsDisplayed);
|
||||
}
|
||||
|
||||
/** Get Displayed.
|
||||
@return Determines, if this field is displayed
|
||||
*/
|
||||
public String getIsDisplayed ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_IsDisplayed);
|
||||
}
|
||||
|
||||
/** IsMandatory AD_Reference_ID=319 */
|
||||
public static final int ISMANDATORY_AD_Reference_ID=319;
|
||||
/** Yes = Y */
|
||||
public static final String ISMANDATORY_Yes = "Y";
|
||||
/** No = N */
|
||||
public static final String ISMANDATORY_No = "N";
|
||||
/** Set Mandatory.
|
||||
@param IsMandatory
|
||||
Data entry is required in this column
|
||||
*/
|
||||
public void setIsMandatory (String IsMandatory)
|
||||
{
|
||||
|
||||
set_Value (COLUMNNAME_IsMandatory, IsMandatory);
|
||||
}
|
||||
|
||||
/** Get Mandatory.
|
||||
@return Data entry is required in this column
|
||||
*/
|
||||
public String getIsMandatory ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_IsMandatory);
|
||||
}
|
||||
|
||||
/** IsQueryCriteria AD_Reference_ID=319 */
|
||||
public static final int ISQUERYCRITERIA_AD_Reference_ID=319;
|
||||
/** Yes = Y */
|
||||
public static final String ISQUERYCRITERIA_Yes = "Y";
|
||||
/** No = N */
|
||||
public static final String ISQUERYCRITERIA_No = "N";
|
||||
/** Set Query Criteria.
|
||||
@param IsQueryCriteria
|
||||
The column is also used as a query criteria
|
||||
*/
|
||||
public void setIsQueryCriteria (String IsQueryCriteria)
|
||||
{
|
||||
|
||||
set_Value (COLUMNNAME_IsQueryCriteria, IsQueryCriteria);
|
||||
}
|
||||
|
||||
/** Get Query Criteria.
|
||||
@return The column is also used as a query criteria
|
||||
*/
|
||||
public String getIsQueryCriteria ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_IsQueryCriteria);
|
||||
}
|
||||
|
||||
/** IsReadOnly AD_Reference_ID=319 */
|
||||
public static final int ISREADONLY_AD_Reference_ID=319;
|
||||
/** Yes = Y */
|
||||
public static final String ISREADONLY_Yes = "Y";
|
||||
/** No = N */
|
||||
public static final String ISREADONLY_No = "N";
|
||||
/** Set Read Only.
|
||||
@param IsReadOnly
|
||||
Field is read only
|
||||
*/
|
||||
public void setIsReadOnly (String IsReadOnly)
|
||||
{
|
||||
|
||||
set_Value (COLUMNNAME_IsReadOnly, IsReadOnly);
|
||||
}
|
||||
|
||||
/** Get Read Only.
|
||||
@return Field is read only
|
||||
*/
|
||||
public String getIsReadOnly ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_IsReadOnly);
|
||||
}
|
||||
|
||||
/** Set Name.
|
||||
@param Name
|
||||
Alphanumeric identifier of the entity
|
||||
*/
|
||||
public void setName (String Name)
|
||||
{
|
||||
set_Value (COLUMNNAME_Name, Name);
|
||||
}
|
||||
|
||||
/** Get Name.
|
||||
@return Alphanumeric identifier of the entity
|
||||
*/
|
||||
public String getName ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Name);
|
||||
}
|
||||
|
||||
/** Set Placeholder.
|
||||
@param Placeholder Placeholder */
|
||||
public void setPlaceholder (String Placeholder)
|
||||
{
|
||||
set_Value (COLUMNNAME_Placeholder, Placeholder);
|
||||
}
|
||||
|
||||
/** Get Placeholder.
|
||||
@return Placeholder */
|
||||
public String getPlaceholder ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Placeholder);
|
||||
}
|
||||
|
||||
/** Set Query Function.
|
||||
@param QueryFunction
|
||||
Database function for query
|
||||
*/
|
||||
public void setQueryFunction (String QueryFunction)
|
||||
{
|
||||
set_Value (COLUMNNAME_QueryFunction, QueryFunction);
|
||||
}
|
||||
|
||||
/** Get Query Function.
|
||||
@return Database function for query
|
||||
*/
|
||||
public String getQueryFunction ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_QueryFunction);
|
||||
}
|
||||
|
||||
/** QueryOperator AD_Reference_ID=200061 */
|
||||
public static final int QUERYOPERATOR_AD_Reference_ID=200061;
|
||||
/** Like = Like */
|
||||
public static final String QUERYOPERATOR_Like = "Like";
|
||||
/** = = = */
|
||||
public static final String QUERYOPERATOR_Eq = "=";
|
||||
/** > = > */
|
||||
public static final String QUERYOPERATOR_Gt = ">";
|
||||
/** >= = >= */
|
||||
public static final String QUERYOPERATOR_GtEq = ">=";
|
||||
/** < = < */
|
||||
public static final String QUERYOPERATOR_Le = "<";
|
||||
/** <= = <= */
|
||||
public static final String QUERYOPERATOR_LeEq = "<=";
|
||||
/** != = != */
|
||||
public static final String QUERYOPERATOR_NotEq = "!=";
|
||||
/** Full Like = LIKE */
|
||||
public static final String QUERYOPERATOR_FullLike = "LIKE";
|
||||
/** Set Query Operator.
|
||||
@param QueryOperator
|
||||
Operator for database query
|
||||
*/
|
||||
public void setQueryOperator (String QueryOperator)
|
||||
{
|
||||
|
||||
set_Value (COLUMNNAME_QueryOperator, QueryOperator);
|
||||
}
|
||||
|
||||
/** Get Query Operator.
|
||||
@return Operator for database query
|
||||
*/
|
||||
public String getQueryOperator ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_QueryOperator);
|
||||
}
|
||||
|
||||
/** Set Sequence.
|
||||
@param SeqNo
|
||||
Method of ordering records; lowest number comes first
|
||||
*/
|
||||
public void setSeqNo (int SeqNo)
|
||||
{
|
||||
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
|
||||
}
|
||||
|
||||
/** Get Sequence.
|
||||
@return Method of ordering records; lowest number comes first
|
||||
*/
|
||||
public int getSeqNo ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Selection Column Sequence.
|
||||
@param SeqNoSelection
|
||||
Selection Column Sequence
|
||||
*/
|
||||
public void setSeqNoSelection (int SeqNoSelection)
|
||||
{
|
||||
set_Value (COLUMNNAME_SeqNoSelection, Integer.valueOf(SeqNoSelection));
|
||||
}
|
||||
|
||||
/** Get Selection Column Sequence.
|
||||
@return Selection Column Sequence
|
||||
*/
|
||||
public int getSeqNoSelection ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNoSelection);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,246 @@
|
|||
/******************************************************************************
|
||||
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software, you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
/** Generated Model - DO NOT CHANGE */
|
||||
package org.compiere.model;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
|
||||
/** Generated Model for AD_UserDef_Info_Related
|
||||
* @author iDempiere (generated)
|
||||
* @version Release 7.1 - $Id$ */
|
||||
public class X_AD_UserDef_Info_Related extends PO implements I_AD_UserDef_Info_Related, I_Persistent
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20201015L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_UserDef_Info_Related (Properties ctx, int AD_UserDef_Info_Related_ID, String trxName)
|
||||
{
|
||||
super (ctx, AD_UserDef_Info_Related_ID, trxName);
|
||||
/** if (AD_UserDef_Info_Related_ID == 0)
|
||||
{
|
||||
setAD_InfoRelated_ID (0);
|
||||
setAD_UserDef_Info_ID (0);
|
||||
// @AD_UserDef_Info_ID@
|
||||
setAD_UserDef_Info_Related_ID (0);
|
||||
} */
|
||||
}
|
||||
|
||||
/** Load Constructor */
|
||||
public X_AD_UserDef_Info_Related (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super (ctx, rs, trxName);
|
||||
}
|
||||
|
||||
/** AccessLevel
|
||||
* @return 6 - System - Client
|
||||
*/
|
||||
protected int get_AccessLevel()
|
||||
{
|
||||
return accessLevel.intValue();
|
||||
}
|
||||
|
||||
/** Load Meta Data */
|
||||
protected POInfo initPO (Properties ctx)
|
||||
{
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||
return poi;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder ("X_AD_UserDef_Info_Related[")
|
||||
.append(get_ID()).append(",Name=").append(getName()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_InfoRelated getAD_InfoRelated() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_InfoRelated)MTable.get(getCtx(), org.compiere.model.I_AD_InfoRelated.Table_Name)
|
||||
.getPO(getAD_InfoRelated_ID(), get_TrxName()); }
|
||||
|
||||
/** Set InfoRelated.
|
||||
@param AD_InfoRelated_ID InfoRelated */
|
||||
public void setAD_InfoRelated_ID (int AD_InfoRelated_ID)
|
||||
{
|
||||
if (AD_InfoRelated_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_AD_InfoRelated_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_AD_InfoRelated_ID, Integer.valueOf(AD_InfoRelated_ID));
|
||||
}
|
||||
|
||||
/** Get InfoRelated.
|
||||
@return InfoRelated */
|
||||
public int getAD_InfoRelated_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_InfoRelated_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_UserDef_Info getAD_UserDef_Info() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_UserDef_Info)MTable.get(getCtx(), org.compiere.model.I_AD_UserDef_Info.Table_Name)
|
||||
.getPO(getAD_UserDef_Info_ID(), get_TrxName()); }
|
||||
|
||||
/** Set User defined Info Window.
|
||||
@param AD_UserDef_Info_ID User defined Info Window */
|
||||
public void setAD_UserDef_Info_ID (int AD_UserDef_Info_ID)
|
||||
{
|
||||
if (AD_UserDef_Info_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_AD_UserDef_Info_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_AD_UserDef_Info_ID, Integer.valueOf(AD_UserDef_Info_ID));
|
||||
}
|
||||
|
||||
/** Get User defined Info Window.
|
||||
@return User defined Info Window */
|
||||
public int getAD_UserDef_Info_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_UserDef_Info_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set User defined Info Related.
|
||||
@param AD_UserDef_Info_Related_ID User defined Info Related */
|
||||
public void setAD_UserDef_Info_Related_ID (int AD_UserDef_Info_Related_ID)
|
||||
{
|
||||
if (AD_UserDef_Info_Related_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_AD_UserDef_Info_Related_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_AD_UserDef_Info_Related_ID, Integer.valueOf(AD_UserDef_Info_Related_ID));
|
||||
}
|
||||
|
||||
/** Get User defined Info Related.
|
||||
@return User defined Info Related */
|
||||
public int getAD_UserDef_Info_Related_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_UserDef_Info_Related_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set AD_UserDef_Info_Related_UU.
|
||||
@param AD_UserDef_Info_Related_UU AD_UserDef_Info_Related_UU */
|
||||
public void setAD_UserDef_Info_Related_UU (String AD_UserDef_Info_Related_UU)
|
||||
{
|
||||
set_ValueNoCheck (COLUMNNAME_AD_UserDef_Info_Related_UU, AD_UserDef_Info_Related_UU);
|
||||
}
|
||||
|
||||
/** Get AD_UserDef_Info_Related_UU.
|
||||
@return AD_UserDef_Info_Related_UU */
|
||||
public String getAD_UserDef_Info_Related_UU ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_AD_UserDef_Info_Related_UU);
|
||||
}
|
||||
|
||||
/** Set Description.
|
||||
@param Description
|
||||
Optional short description of the record
|
||||
*/
|
||||
public void setDescription (String Description)
|
||||
{
|
||||
set_Value (COLUMNNAME_Description, Description);
|
||||
}
|
||||
|
||||
/** Get Description.
|
||||
@return Optional short description of the record
|
||||
*/
|
||||
public String getDescription ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Description);
|
||||
}
|
||||
|
||||
/** Set Display Logic.
|
||||
@param DisplayLogic
|
||||
If the Field is displayed, the result determines if the field is actually displayed
|
||||
*/
|
||||
public void setDisplayLogic (String DisplayLogic)
|
||||
{
|
||||
set_Value (COLUMNNAME_DisplayLogic, DisplayLogic);
|
||||
}
|
||||
|
||||
/** Get Display Logic.
|
||||
@return If the Field is displayed, the result determines if the field is actually displayed
|
||||
*/
|
||||
public String getDisplayLogic ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_DisplayLogic);
|
||||
}
|
||||
|
||||
/** Set Comment/Help.
|
||||
@param Help
|
||||
Comment or Hint
|
||||
*/
|
||||
public void setHelp (String Help)
|
||||
{
|
||||
set_Value (COLUMNNAME_Help, Help);
|
||||
}
|
||||
|
||||
/** Get Comment/Help.
|
||||
@return Comment or Hint
|
||||
*/
|
||||
public String getHelp ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Help);
|
||||
}
|
||||
|
||||
/** Set Name.
|
||||
@param Name
|
||||
Alphanumeric identifier of the entity
|
||||
*/
|
||||
public void setName (String Name)
|
||||
{
|
||||
set_Value (COLUMNNAME_Name, Name);
|
||||
}
|
||||
|
||||
/** Get Name.
|
||||
@return Alphanumeric identifier of the entity
|
||||
*/
|
||||
public String getName ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Name);
|
||||
}
|
||||
|
||||
/** Set Sequence.
|
||||
@param SeqNo
|
||||
Method of ordering records; lowest number comes first
|
||||
*/
|
||||
public void setSeqNo (int SeqNo)
|
||||
{
|
||||
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
|
||||
}
|
||||
|
||||
/** Get Sequence.
|
||||
@return Method of ordering records; lowest number comes first
|
||||
*/
|
||||
public int getSeqNo ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
}
|
|
@ -32,7 +32,7 @@ import org.adempiere.webui.theme.ThemeManager;
|
|||
import org.compiere.minigrid.ColumnInfo;
|
||||
import org.compiere.minigrid.IDColumn;
|
||||
import org.compiere.model.GridField;
|
||||
import org.compiere.model.MInfoColumn;
|
||||
import org.compiere.model.InfoColumnVO;
|
||||
import org.compiere.model.MStyle;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Evaluatee;
|
||||
|
@ -41,7 +41,7 @@ import org.zkoss.zul.Listcell;
|
|||
|
||||
public class WInfoWindowListItemRenderer extends WListItemRenderer
|
||||
{
|
||||
private MInfoColumn[] gridDisplayedInfoColumns = null;
|
||||
private InfoColumnVO[] gridDisplayedInfoColumns = null;
|
||||
private ColumnInfo[] gridDisplayedColumnInfos = null;
|
||||
private InfoWindow infoWindow = null;
|
||||
|
||||
|
@ -56,7 +56,7 @@ public class WInfoWindowListItemRenderer extends WListItemRenderer
|
|||
this.infoWindow = infoWindow;
|
||||
}
|
||||
|
||||
public void setGridDisplaydInfoColumns(MInfoColumn[] infoColumns, ColumnInfo[] columnInfos)
|
||||
public void setGridDisplaydInfoColumns(InfoColumnVO[] infoColumns, ColumnInfo[] columnInfos)
|
||||
{
|
||||
this.gridDisplayedInfoColumns = infoColumns;
|
||||
this.gridDisplayedColumnInfos = columnInfos;
|
||||
|
@ -75,7 +75,7 @@ public class WInfoWindowListItemRenderer extends WListItemRenderer
|
|||
ListModelTable model = table.getModel();
|
||||
Object obj = model.get(rowIndex);
|
||||
|
||||
MInfoColumn infoColumn = gridDisplayedInfoColumns[columnIndex];
|
||||
InfoColumnVO infoColumn = gridDisplayedInfoColumns[columnIndex];
|
||||
if (infoColumn != null)
|
||||
{
|
||||
|
||||
|
@ -135,7 +135,7 @@ public class WInfoWindowListItemRenderer extends WListItemRenderer
|
|||
String value = null;
|
||||
|
||||
int idx = 0;
|
||||
for (MInfoColumn ic : gridDisplayedInfoColumns)
|
||||
for (InfoColumnVO ic : gridDisplayedInfoColumns)
|
||||
{
|
||||
if (ic != null && ic.getColumnName().equals(variableName))
|
||||
{
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.adempiere.webui.window.InfoSchedule;
|
|||
import org.compiere.model.MInfoWindow;
|
||||
import org.compiere.model.MRole;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.model.MUserDefInfo;
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
|
@ -102,9 +103,16 @@ public class DPViews extends DashboardPanel implements EventListener<Event> {
|
|||
MInfoWindow info = infos[i];
|
||||
if (MInfoWindow.get(info.getAD_InfoWindow_ID(), null) != null)
|
||||
{
|
||||
// Load User Def
|
||||
String name = info.get_Translation("Name");
|
||||
MUserDefInfo userDef = MUserDefInfo.getBestMatch(Env.getCtx(), info.getAD_InfoWindow_ID());
|
||||
if(userDef != null && !Util.isEmpty(userDef.getName())) {
|
||||
name = userDef.getName();
|
||||
}
|
||||
|
||||
ToolBarButton btnViewItem = new ToolBarButton(info.getName());
|
||||
btnViewItem.setSclass("link");
|
||||
btnViewItem.setLabel(info.get_Translation("Name"));
|
||||
btnViewItem.setLabel(name);
|
||||
String image = (Util.isEmpty(info.getImageURL()) ? "Info16.png" : info.getImageURL());
|
||||
if (ThemeManager.isUseFontIconForImage())
|
||||
{
|
||||
|
|
|
@ -71,6 +71,8 @@ import org.compiere.model.AccessSqlParser.TableInfo;
|
|||
import org.compiere.model.GridField;
|
||||
import org.compiere.model.GridFieldVO;
|
||||
import org.compiere.model.GridWindow;
|
||||
import org.compiere.model.InfoColumnVO;
|
||||
import org.compiere.model.InfoRelatedVO;
|
||||
import org.compiere.model.Lookup;
|
||||
import org.compiere.model.MInfoColumn;
|
||||
import org.compiere.model.MInfoWindow;
|
||||
|
@ -80,6 +82,7 @@ import org.compiere.model.MProcess;
|
|||
import org.compiere.model.MRole;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.model.MTable;
|
||||
import org.compiere.model.MUserDefInfo;
|
||||
import org.compiere.model.X_AD_InfoColumn;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.DisplayType;
|
||||
|
@ -145,7 +148,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
|
||||
protected ColumnInfo[] columnInfos;
|
||||
protected TableInfo[] tableInfos;
|
||||
protected MInfoColumn[] infoColumns;
|
||||
protected InfoColumnVO[] infoColumns;
|
||||
|
||||
protected WQuickEntry vqe;
|
||||
|
||||
|
@ -586,21 +589,23 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
}
|
||||
}
|
||||
|
||||
infoColumns = infoWindow.getInfoColumns(tableInfos);
|
||||
MInfoColumn[] p_infoColumns = infoWindow.getInfoColumns(tableInfos);
|
||||
infoColumns = InfoColumnVO.create(Env.getCtx(), p_infoColumns);
|
||||
|
||||
gridFields = new ArrayList<GridField>();
|
||||
|
||||
for(MInfoColumn infoColumn : infoColumns) {
|
||||
for(InfoColumnVO infoColumn : infoColumns) {
|
||||
if (infoColumn.isKey())
|
||||
keyColumnOfView = infoColumn;
|
||||
keyColumnOfView = infoColumn.getAD_InfoColumn();
|
||||
String columnName = infoColumn.getColumnName();
|
||||
/*!m_lookup && infoColumn.isMandatory():apply Mandatory only case open as window and only for criteria field*/
|
||||
boolean isMandatory = !m_lookup && infoColumn.isMandatory() && infoColumn.isQueryCriteria();
|
||||
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(),
|
||||
infoColumn.getAD_Reference_Value_ID(), isMandatory, false, infoColumn.get_Translation("Placeholder"));
|
||||
columnName, infoColumn.getNameTrl(), infoColumn.getAD_Reference_ID(),
|
||||
infoColumn.getAD_Reference_Value_ID(), isMandatory, false, infoColumn.getPlaceHolderTrl());
|
||||
|
||||
if (infoColumn.getAD_Val_Rule_ID() > 0) {
|
||||
vo.ValidationCode = infoColumn.getAD_Val_Rule().getCode();
|
||||
vo.ValidationCode = infoColumn.getValidationCode();
|
||||
if (vo.lookupInfo != null) {
|
||||
vo.lookupInfo.ValidationCode = vo.ValidationCode;
|
||||
vo.lookupInfo.IsValidated = false;
|
||||
|
@ -610,9 +615,9 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
vo.DisplayLogic = infoColumn.getDisplayLogic();
|
||||
if (infoColumn.isQueryCriteria() && infoColumn.getDefaultValue() != null)
|
||||
vo.DefaultValue = infoColumn.getDefaultValue();
|
||||
String desc = infoColumn.get_Translation("Description");
|
||||
String desc = infoColumn.getDescriptionTrl();
|
||||
vo.Description = desc != null ? desc : "";
|
||||
String help = infoColumn.get_Translation("Help");
|
||||
String help = infoColumn.getHelpTrl();
|
||||
vo.Help = help != null ? help : "";
|
||||
vo.AD_FieldStyle_ID = infoColumn.getAD_FieldStyle_ID();
|
||||
vo.IsAutocomplete = infoColumn.isAutocomplete();
|
||||
|
@ -633,7 +638,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
|
||||
if(processCount > 0)
|
||||
{
|
||||
for(MInfoColumn infoColumn:infoColumns)
|
||||
for(InfoColumnVO infoColumn:infoColumns)
|
||||
{
|
||||
if(infoColumn.isReadOnly() == false)
|
||||
{
|
||||
|
@ -673,29 +678,26 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
}
|
||||
}
|
||||
|
||||
//private MInfoColumn[] topinfoColumns;//infoWindow.getInfoColumns(tableInfos);
|
||||
//private InfoColumnVO[] topinfoColumns;//infoWindow.getInfoColumns(tableInfos);
|
||||
protected boolean loadInfoRelatedTabs() {
|
||||
if (infoWindow == null)
|
||||
return false;
|
||||
|
||||
// topinfoColumns = infoWindow.getInfoColumns();
|
||||
relatedInfoList = infoWindow.getInfoRelated(true);
|
||||
MInfoRelated[] infoRelatedList = infoWindow.getInfoRelated(true);
|
||||
//Init Info Related VO
|
||||
relatedInfoList = InfoRelatedVO.getInfoRelatedVOList(Env.getCtx(), infoRelatedList, p_WindowNo);
|
||||
|
||||
Tabpanels tabPanels = new Tabpanels();
|
||||
Tabs tabs = new Tabs();
|
||||
|
||||
if (relatedInfoList.length > 0) { // setup the panel
|
||||
|
||||
//embeddedPane.setTitle(Msg.translate(Env.getCtx(), "Related Information"));
|
||||
ZKUpdateUtil.setHeight(embeddedPane, "100%");
|
||||
//tabPanels = new Tabpanels();
|
||||
embeddedPane.appendChild(tabPanels);
|
||||
//tabs = new Tabs();
|
||||
embeddedPane.appendChild(tabs);
|
||||
|
||||
}
|
||||
|
||||
// for(int i=0; i < relatedinfoList.length - 1 ; i++) {
|
||||
for (MInfoRelated relatedInfo:relatedInfoList) {
|
||||
for (InfoRelatedVO relatedInfo:relatedInfoList) {
|
||||
|
||||
if(!relatedInfo.isDisplayed(infoContext)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String tableName = null;
|
||||
int infoRelatedID = relatedInfo.getRelatedInfo_ID();
|
||||
|
@ -748,12 +750,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
RelatedInfoWindow relatedInfoWindow = new RelatedInfoWindow(ewinInfo, this, embeddedPaging, s_sqlCount, s_layoutEmbedded, editorMap);
|
||||
relatedMap.put(embedInfo.getAD_InfoWindow_ID(), relatedInfoWindow);
|
||||
|
||||
MInfoWindow riw = (MInfoWindow) relatedInfo.getRelatedInfo();
|
||||
String tabTitle;
|
||||
if (riw != null)
|
||||
tabTitle = Util.cleanAmp(riw.get_Translation("Name"));
|
||||
else
|
||||
tabTitle = relatedInfo.getName();
|
||||
String tabTitle = relatedInfo.getName();
|
||||
Tab tab = new Tab(tabTitle);
|
||||
tabs.appendChild(tab);
|
||||
Tabpanel desktopTabPanel = new Tabpanel();
|
||||
|
@ -769,6 +766,17 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
|
||||
}
|
||||
|
||||
if (relatedInfoList.length > 0) { // setup the panel
|
||||
|
||||
//embeddedPane.setTitle(Msg.translate(Env.getCtx(), "Related Information"));
|
||||
ZKUpdateUtil.setHeight(embeddedPane, "100%");
|
||||
//tabPanels = new Tabpanels();
|
||||
embeddedPane.appendChild(tabPanels);
|
||||
//tabs = new Tabs();
|
||||
embeddedPane.appendChild(tabs);
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -781,13 +789,13 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
String keySelectClause = keyTableAlias+"."+p_keyColumn;
|
||||
list.add(new ColumnInfo(" ", keySelectClause, IDColumn.class, true, false, null, p_keyColumn));
|
||||
|
||||
List<MInfoColumn> gridDisplayedIC = new ArrayList<>();
|
||||
List<InfoColumnVO> gridDisplayedIC = new ArrayList<>();
|
||||
gridDisplayedIC.add(null); // First column does not have any matching info column
|
||||
|
||||
boolean haveNotProcess = !haveProcess; // A field is editabile only if is not readonly and theres a process
|
||||
|
||||
int i = 0;
|
||||
for(MInfoColumn infoColumn : infoColumns)
|
||||
for(InfoColumnVO infoColumn : infoColumns)
|
||||
{
|
||||
if (infoColumn.isDisplayed(infoContext, p_WindowNo))
|
||||
{
|
||||
|
@ -800,7 +808,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
if (infoColumn.getSelectClause().equalsIgnoreCase(keySelectClause))
|
||||
continue;
|
||||
|
||||
columnInfo = new ColumnInfo(infoColumn.get_Translation("Name"), colSQL, DisplayType.getClass(infoColumn.getAD_Reference_ID(), true), infoColumn.isReadOnly() || haveNotProcess);
|
||||
columnInfo = new ColumnInfo(infoColumn.getNameTrl(), colSQL, DisplayType.getClass(infoColumn.getAD_Reference_ID(), true), infoColumn.isReadOnly() || haveNotProcess);
|
||||
}
|
||||
else if (DisplayType.isLookup(infoColumn.getAD_Reference_ID()))
|
||||
{
|
||||
|
@ -811,7 +819,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
editor.setMandatory(false);
|
||||
editor.setReadWrite(false);
|
||||
editorMap.put(colSQL, editor);
|
||||
columnInfo = new ColumnInfo(infoColumn.get_Translation("Name"), colSQL, ValueNamePair.class, (String)null, infoColumn.isReadOnly() || haveNotProcess);
|
||||
columnInfo = new ColumnInfo(infoColumn.getNameTrl(), colSQL, ValueNamePair.class, (String)null, infoColumn.isReadOnly() || haveNotProcess);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -820,16 +828,16 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
}
|
||||
else
|
||||
{
|
||||
columnInfo = new ColumnInfo(infoColumn.get_Translation("Name"), colSQL, DisplayType.getClass(infoColumn.getAD_Reference_ID(), true), infoColumn.isReadOnly() || haveNotProcess);
|
||||
columnInfo = new ColumnInfo(infoColumn.getNameTrl(), colSQL, DisplayType.getClass(infoColumn.getAD_Reference_ID(), true), infoColumn.isReadOnly() || haveNotProcess);
|
||||
}
|
||||
columnInfo.setColDescription(infoColumn.get_Translation("Description"));
|
||||
columnInfo.setColDescription(infoColumn.getNameTrl());
|
||||
columnInfo.setAD_Reference_ID(infoColumn.getAD_Reference_ID());
|
||||
columnInfo.setGridField(gridFields.get(i));
|
||||
columnInfo.setColumnName(infoColumn.getColumnName());
|
||||
list.add(columnInfo);
|
||||
gridDisplayedIC.add(infoColumn);
|
||||
|
||||
if (keyColumnOfView == infoColumn){
|
||||
if (keyColumnOfView == infoColumn.getAD_InfoColumn()){
|
||||
if (columnInfo.getColClass().equals(IDColumn.class))
|
||||
isIDColumnKeyOfView = true;
|
||||
indexKeyOfView = list.size() - 1;
|
||||
|
@ -843,7 +851,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
}
|
||||
|
||||
columnInfos = list.toArray(new ColumnInfo[0]);
|
||||
MInfoColumn gridDisplayedInfoColumns[] = gridDisplayedIC.toArray(new MInfoColumn[gridDisplayedIC.size()]);
|
||||
InfoColumnVO gridDisplayedInfoColumns[] = gridDisplayedIC.toArray(new InfoColumnVO[gridDisplayedIC.size()]);
|
||||
|
||||
if(infoWindowListItemRenderer != null)
|
||||
infoWindowListItemRenderer.setGridDisplaydInfoColumns(gridDisplayedInfoColumns,columnInfos);
|
||||
|
@ -852,7 +860,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
}
|
||||
|
||||
protected ColumnInfo createLookupColumnInfo(TableInfo[] tableInfos,
|
||||
GridField gridField, MInfoColumn infoColumn) {
|
||||
GridField gridField, InfoColumnVO infoColumn) {
|
||||
String columnName = gridField.getColumnName();
|
||||
String validationCode = "";
|
||||
MLookupInfo lookupInfo = MLookupFactory.getLookupInfo(Env.getCtx(), p_WindowNo, 0, infoColumn.getAD_Reference_ID(), Env.getLanguage(Env.getCtx()), columnName, infoColumn.getAD_Reference_Value_ID(), false, validationCode);
|
||||
|
@ -871,7 +879,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
if (tableInfo.getTableName().equalsIgnoreCase(lookupInfo.TableName))
|
||||
{
|
||||
displayColumn = displayColumn.replace(lookupInfo.TableName+".", tableInfo.getSynonym()+".");
|
||||
ColumnInfo columnInfo = new ColumnInfo(infoColumn.get_Translation("Name"), displayColumn, KeyNamePair.class, infoColumn.getSelectClause(), infoColumn.isReadOnly() || haveNotProcess);
|
||||
ColumnInfo columnInfo = new ColumnInfo(infoColumn.getNameTrl(), displayColumn, KeyNamePair.class, infoColumn.getSelectClause(), infoColumn.isReadOnly() || haveNotProcess);
|
||||
return columnInfo;
|
||||
}
|
||||
break;
|
||||
|
@ -889,7 +897,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
colSQL += " AS " + infoColumn.getColumnName();
|
||||
editorMap.put(colSQL, editor);
|
||||
Class<?> colClass = columnName.endsWith("_ID") ? KeyNamePair.class : String.class;
|
||||
ColumnInfo columnInfo = new ColumnInfo(infoColumn.get_Translation("Name"), colSQL, colClass, (String)null, infoColumn.isReadOnly() || haveNotProcess);
|
||||
ColumnInfo columnInfo = new ColumnInfo(infoColumn.getNameTrl(), colSQL, colClass, (String)null, infoColumn.isReadOnly() || haveNotProcess);
|
||||
return columnInfo;
|
||||
}
|
||||
|
||||
|
@ -937,11 +945,11 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
builder.append(whereClause);
|
||||
}
|
||||
} else if (editor.getGridField() != null && editor.getValue() != null && editor.getValue().toString().trim().length() > 0) {
|
||||
MInfoColumn mInfoColumn = findInfoColumn(editor.getGridField());
|
||||
if (mInfoColumn == null || mInfoColumn.getSelectClause().equals("0")) {
|
||||
InfoColumnVO InfoColumnVO = findInfoColumn(editor.getGridField());
|
||||
if (InfoColumnVO == null || InfoColumnVO.getSelectClause().equals("0")) {
|
||||
continue;
|
||||
}
|
||||
String columnName = mInfoColumn.getSelectClause();
|
||||
String columnName = InfoColumnVO.getSelectClause();
|
||||
int asIndex = columnName.toUpperCase().lastIndexOf(" AS ");
|
||||
if (asIndex > 0) {
|
||||
columnName = columnName.substring(0, asIndex);
|
||||
|
@ -962,7 +970,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
builder.append(checkAND.isChecked() ? " AND " : " OR ");
|
||||
}
|
||||
|
||||
if (mInfoColumn.getAD_Reference_ID() == DisplayType.ChosenMultipleSelectionList)
|
||||
if (InfoColumnVO.getAD_Reference_ID() == DisplayType.ChosenMultipleSelectionList)
|
||||
{
|
||||
String pString = editor.getValue().toString();
|
||||
String column = columnName;
|
||||
|
@ -974,7 +982,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
else
|
||||
builder.append(DB.inClauseForCSV(columnName, pString));
|
||||
}
|
||||
else if (mInfoColumn.getAD_Reference_ID() == DisplayType.ChosenMultipleSelectionTable || mInfoColumn.getAD_Reference_ID() == DisplayType.ChosenMultipleSelectionSearch)
|
||||
else if (InfoColumnVO.getAD_Reference_ID() == DisplayType.ChosenMultipleSelectionTable || InfoColumnVO.getAD_Reference_ID() == DisplayType.ChosenMultipleSelectionSearch)
|
||||
{
|
||||
String pString = editor.getValue().toString();
|
||||
if (columnName.endsWith("_ID"))
|
||||
|
@ -989,8 +997,8 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
else
|
||||
{
|
||||
String columnClause = null;
|
||||
if (mInfoColumn.getQueryFunction() != null && mInfoColumn.getQueryFunction().trim().length() > 0) {
|
||||
String function = mInfoColumn.getQueryFunction();
|
||||
if (InfoColumnVO.getQueryFunction() != null && InfoColumnVO.getQueryFunction().trim().length() > 0) {
|
||||
String function = InfoColumnVO.getQueryFunction();
|
||||
if (function.indexOf("@") >= 0) {
|
||||
String s = Env.parseContext(infoContext, p_WindowNo, function, true, false);
|
||||
if (s.length() == 0) {
|
||||
|
@ -1009,7 +1017,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
}
|
||||
builder.append(columnClause)
|
||||
.append(" ")
|
||||
.append(mInfoColumn.getQueryOperator());
|
||||
.append(InfoColumnVO.getQueryOperator());
|
||||
if (columnClause.toUpperCase().startsWith("UPPER(")) {
|
||||
builder.append(" UPPER(?)");
|
||||
} else {
|
||||
|
@ -1032,7 +1040,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
return sql;
|
||||
}
|
||||
|
||||
protected MInfoColumn findInfoColumn(GridField gridField) {
|
||||
protected InfoColumnVO findInfoColumn(GridField gridField) {
|
||||
for(int i = 0; i < gridFields.size(); i++) {
|
||||
if (gridFields.get(i) == gridField) {
|
||||
return infoColumns[i];
|
||||
|
@ -1066,8 +1074,8 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
continue;
|
||||
|
||||
if (editor.getGridField() != null && editor.getValue() != null && editor.getValue().toString().trim().length() > 0) {
|
||||
MInfoColumn mInfoColumn = findInfoColumn(editor.getGridField());
|
||||
if (mInfoColumn == null || mInfoColumn.getSelectClause().equals("0")) {
|
||||
InfoColumnVO InfoColumnVO = findInfoColumn(editor.getGridField());
|
||||
if (InfoColumnVO == null || InfoColumnVO.getSelectClause().equals("0")) {
|
||||
continue;
|
||||
}
|
||||
return true;
|
||||
|
@ -1108,20 +1116,20 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
continue;
|
||||
|
||||
if (editor.getGridField() != null && editor.getValue() != null && editor.getValue().toString().trim().length() > 0) {
|
||||
MInfoColumn mInfoColumn = findInfoColumn(editor.getGridField());
|
||||
if (mInfoColumn == null || mInfoColumn.getSelectClause().equals("0")) {
|
||||
InfoColumnVO InfoColumnVO = findInfoColumn(editor.getGridField());
|
||||
if (InfoColumnVO == null || InfoColumnVO.getSelectClause().equals("0")) {
|
||||
continue;
|
||||
}
|
||||
if (mInfoColumn.getAD_Reference_ID()==DisplayType.ChosenMultipleSelectionList || mInfoColumn.getAD_Reference_ID()==DisplayType.ChosenMultipleSelectionSearch
|
||||
|| mInfoColumn.getAD_Reference_ID()==DisplayType.ChosenMultipleSelectionTable) {
|
||||
if (InfoColumnVO.getAD_Reference_ID()==DisplayType.ChosenMultipleSelectionList || InfoColumnVO.getAD_Reference_ID()==DisplayType.ChosenMultipleSelectionSearch
|
||||
|| InfoColumnVO.getAD_Reference_ID()==DisplayType.ChosenMultipleSelectionTable) {
|
||||
continue;
|
||||
}
|
||||
Object value = editor.getValue();
|
||||
parameterIndex++;
|
||||
prevParameterValues.add(value);
|
||||
prevQueryOperators.add(mInfoColumn.getQueryOperator());
|
||||
prevQueryOperators.add(InfoColumnVO.getQueryOperator());
|
||||
prevRefParmeterEditor.add(editor);
|
||||
setParameter (pstmt, parameterIndex, value, mInfoColumn.getQueryOperator());
|
||||
setParameter (pstmt, parameterIndex, value, InfoColumnVO.getQueryOperator());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1240,7 +1248,8 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
if (infoProcess.getInfoColumnID() <= 0)
|
||||
continue;
|
||||
|
||||
MInfoColumn infocol = (MInfoColumn) infoProcess.getAD_InfoColumn();
|
||||
MInfoColumn p_infocol = (MInfoColumn) infoProcess.getAD_InfoColumn();
|
||||
InfoColumnVO infocol = new InfoColumnVO(Env.getCtx(), p_infocol);
|
||||
|
||||
if (! infocol.isDisplayed()) {
|
||||
sqlColumn.append(", ").append(infocol.getSelectClause()).append(" AS ").append(infocol.getColumnName()).append(" ");
|
||||
|
@ -1261,7 +1270,13 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
|
||||
protected void renderWindow()
|
||||
{
|
||||
setTitle(infoWindow.get_Translation("Name"));
|
||||
// Load User Def
|
||||
MUserDefInfo userDef = MUserDefInfo.getBestMatch(Env.getCtx(), infoWindow.getAD_InfoWindow_ID());
|
||||
if(userDef != null && !Util.isEmpty(userDef.getName())) {
|
||||
setTitle(userDef.getName());
|
||||
} else {
|
||||
setTitle(infoWindow.get_Translation("Name"));
|
||||
}
|
||||
layout = new Borderlayout();
|
||||
ZKUpdateUtil.setWidth(layout, "100%");
|
||||
ZKUpdateUtil.setHeight(layout, "100%");
|
||||
|
@ -1430,7 +1445,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
}
|
||||
}
|
||||
} else {
|
||||
addSelectionColumn((MInfoColumn)value[0], (GridField)value[1]);
|
||||
addSelectionColumn((InfoColumnVO)value[0], (GridField)value[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1475,7 +1490,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
* @param infoColumn
|
||||
* @param mField field
|
||||
**/
|
||||
protected void addSelectionColumn(MInfoColumn infoColumn, GridField mField)
|
||||
protected void addSelectionColumn(InfoColumnVO infoColumn, GridField mField)
|
||||
{
|
||||
int displayLength = mField.getDisplayLength();
|
||||
if (displayLength <= 0 || displayLength > FIELDLENGTH)
|
||||
|
@ -1984,7 +1999,9 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
AccessSqlParser sqlParser = new AccessSqlParser("SELECT * FROM " + info.getFromClause());
|
||||
TableInfo[] tableInfos = sqlParser.getTableInfo(0);
|
||||
|
||||
MInfoColumn[] infoColumns = info.getInfoColumns(tableInfos);
|
||||
MInfoColumn[] p_infoColumns = info.getInfoColumns(tableInfos);
|
||||
InfoColumnVO[] infoColumns = InfoColumnVO.create(Env.getCtx(), p_infoColumns);
|
||||
|
||||
ArrayList<ColumnInfo> list = new ArrayList<ColumnInfo>();
|
||||
String keyTableAlias = tableInfos[0].getSynonym() != null && tableInfos[0].getSynonym().trim().length() > 0
|
||||
? tableInfos[0].getSynonym()
|
||||
|
@ -1992,7 +2009,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
|
||||
String keySelectClause = keyTableAlias + "." + p_keyColumn;
|
||||
|
||||
for (MInfoColumn infoColumn : infoColumns)
|
||||
for (InfoColumnVO infoColumn : infoColumns)
|
||||
{
|
||||
if (infoColumn.isDisplayed(infoContext, p_WindowNo))
|
||||
{
|
||||
|
@ -2005,7 +2022,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
if (infoColumn.getSelectClause().equalsIgnoreCase(keySelectClause))
|
||||
continue;
|
||||
|
||||
columnInfo = new ColumnInfo(infoColumn.get_Translation("Name"), colSQL, DisplayType.getClass(infoColumn.getAD_Reference_ID(), true));
|
||||
columnInfo = new ColumnInfo(infoColumn.getNameTrl(), colSQL, DisplayType.getClass(infoColumn.getAD_Reference_ID(), true));
|
||||
}
|
||||
else if (DisplayType.isLookup(infoColumn.getAD_Reference_ID()))
|
||||
{
|
||||
|
@ -2016,7 +2033,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
editor.setMandatory(false);
|
||||
editor.setReadWrite(false);
|
||||
editorMap.put(colSQL, editor);
|
||||
columnInfo = new ColumnInfo(infoColumn.get_Translation("Name"), colSQL, ValueNamePair.class, (String)null);
|
||||
columnInfo = new ColumnInfo(infoColumn.getNameTrl(), colSQL, ValueNamePair.class, (String)null);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2026,9 +2043,9 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
}
|
||||
else
|
||||
{
|
||||
columnInfo = new ColumnInfo(infoColumn.get_Translation("Name"), colSQL, DisplayType.getClass(infoColumn.getAD_Reference_ID(), true));
|
||||
columnInfo = new ColumnInfo(infoColumn.getNameTrl(), colSQL, DisplayType.getClass(infoColumn.getAD_Reference_ID(), true));
|
||||
}
|
||||
columnInfo.setColDescription(infoColumn.get_Translation("Description"));
|
||||
columnInfo.setColDescription(infoColumn.getDescriptionTrl());
|
||||
columnInfo.setGridField(getGridField(infoColumn));
|
||||
list.add(columnInfo);
|
||||
}
|
||||
|
@ -2053,24 +2070,24 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
|
||||
/**
|
||||
* @author xolali IDEMPIERE-1045
|
||||
* GridField getGridField(MInfoColumn infoColumn)
|
||||
* GridField getGridField(InfoColumnVO infoColumn)
|
||||
*/
|
||||
protected GridField getGridField(MInfoColumn infoColumn){
|
||||
protected GridField getGridField(InfoColumnVO infoColumn){
|
||||
String columnName = infoColumn.getColumnName();
|
||||
GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, AEnv.getADWindowID(p_WindowNo), m_infoWindowID, 0,
|
||||
columnName, infoColumn.get_Translation("Name"), infoColumn.getAD_Reference_ID(),
|
||||
infoColumn.getAD_Reference_Value_ID(), false, false, infoColumn.get_Translation("Placeholder"));
|
||||
columnName, infoColumn.getNameTrl(), infoColumn.getAD_Reference_ID(),
|
||||
infoColumn.getAD_Reference_Value_ID(), false, false, infoColumn.getPlaceHolderTrl());
|
||||
if (infoColumn.getAD_Val_Rule_ID() > 0) {
|
||||
vo.ValidationCode = infoColumn.getAD_Val_Rule().getCode();
|
||||
vo.ValidationCode = infoColumn.getValidationCode();
|
||||
if (vo.lookupInfo != null) {
|
||||
vo.lookupInfo.ValidationCode = vo.ValidationCode;
|
||||
vo.lookupInfo.IsValidated = false;
|
||||
}
|
||||
}
|
||||
vo.DisplayLogic = infoColumn.getDisplayLogic() != null ? infoColumn.getDisplayLogic() : "";
|
||||
String desc = infoColumn.get_Translation("Description");
|
||||
String desc = infoColumn.getDescriptionTrl();
|
||||
vo.Description = desc != null ? desc : "";
|
||||
String help = infoColumn.get_Translation("Help");
|
||||
String help = infoColumn.getHelpTrl();
|
||||
vo.Help = help != null ? help : "";
|
||||
vo.AD_FieldStyle_ID = infoColumn.getAD_FieldStyle_ID();
|
||||
GridField gridField = new GridField(vo);
|
||||
|
@ -2276,7 +2293,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
val = kdc;
|
||||
}
|
||||
|
||||
MInfoColumn infoColumn = infoColumns[colIndex - 1];
|
||||
InfoColumnVO infoColumn = infoColumns[colIndex - 1];
|
||||
boolean changeIsValid = true;
|
||||
String validationSQL = null;
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ import org.compiere.model.MQuery;
|
|||
import org.compiere.model.MRole;
|
||||
import org.compiere.model.MTab;
|
||||
import org.compiere.model.MTask;
|
||||
import org.compiere.model.MUserDefInfo;
|
||||
import org.compiere.model.PO;
|
||||
import org.compiere.model.X_AD_CtxHelp;
|
||||
import org.compiere.util.Env;
|
||||
|
@ -427,17 +428,29 @@ public class HelpController
|
|||
else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Info))
|
||||
{
|
||||
MInfoWindow info = new MInfoWindow(Env.getCtx(), recordId, null);
|
||||
if (!Env.isBaseLanguage(Env.getCtx(), I_AD_InfoWindow.Table_Name)) {
|
||||
// Load User Def
|
||||
MUserDefInfo userDef = MUserDefInfo.getBestMatch(Env.getCtx(), info.getAD_InfoWindow_ID());
|
||||
|
||||
if (!Env.isBaseLanguage(Env.getCtx(), I_AD_InfoWindow.Table_Name)) {
|
||||
nameMsg = info.get_Translation("Name",false);
|
||||
if (info != null && nameMsg != null
|
||||
if(userDef != null && !Util.isEmpty(userDef.getName())) {
|
||||
nameMsg = userDef.getName();
|
||||
}
|
||||
if (nameMsg != null
|
||||
&& nameMsg.length() != 0)
|
||||
translatedContent.append("<p><strong>" + nameMsg + "</strong></p>\n");
|
||||
|
||||
descMsg = info.get_Translation("Description",false);
|
||||
if(userDef != null && !Util.isEmpty(userDef.getDescription())) {
|
||||
descMsg = userDef.getDescription();
|
||||
}
|
||||
if (descMsg != null && descMsg.length() != 0)
|
||||
translatedContent.append("<p><em>" + descMsg + "</em></p>\n");
|
||||
|
||||
helpMsg = info.get_Translation("Help",false);
|
||||
if(userDef != null && !Util.isEmpty(userDef.getHelp())) {
|
||||
helpMsg = userDef.getHelp();
|
||||
}
|
||||
if (helpMsg != null && helpMsg.length() != 0)
|
||||
translatedContent.append("<p>" + helpMsg + "</p>\n");
|
||||
|
||||
|
@ -448,17 +461,29 @@ public class HelpController
|
|||
}
|
||||
}
|
||||
|
||||
if (info != null && info.getName() != null
|
||||
&& info.getName().length() != 0)
|
||||
baseContent.append("<p><strong>" + info.getName() + "</strong></p>\n");
|
||||
String name = info.getName();
|
||||
if(userDef != null && !Util.isEmpty(userDef.getName())) {
|
||||
name = userDef.getName();
|
||||
}
|
||||
if ( name != null
|
||||
&& name.length() != 0)
|
||||
baseContent.append("<p><strong>" + name + "</strong></p>\n");
|
||||
|
||||
if (info.getDescription() != null
|
||||
&& info.getDescription().length() != 0)
|
||||
baseContent.append("<p><em>" + info.getDescription() + "</em></p>\n");
|
||||
String description = info.getDescription();
|
||||
if(userDef != null && !Util.isEmpty(userDef.getDescription())) {
|
||||
description = userDef.getDescription();
|
||||
}
|
||||
if (description != null
|
||||
&& description.length() != 0)
|
||||
baseContent.append("<p><em>" + description + "</em></p>\n");
|
||||
|
||||
if (info.getHelp() != null
|
||||
&& info.getHelp().length() != 0)
|
||||
baseContent.append("<p>" + info.getHelp() + "</p>\n");
|
||||
String help = info.getHelp();
|
||||
if(userDef != null && !Util.isEmpty(userDef.getHelp())) {
|
||||
help = userDef.getHelp();
|
||||
}
|
||||
if (help != null
|
||||
&& help.length() != 0)
|
||||
baseContent.append("<p>" + help + "</p>\n");
|
||||
|
||||
if (baseContent.length() > 0)
|
||||
{
|
||||
|
|
|
@ -40,7 +40,6 @@ import java.util.logging.Level;
|
|||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.adempiere.model.IInfoColumn;
|
||||
import org.adempiere.model.MInfoProcess;
|
||||
import org.adempiere.model.MInfoRelated;
|
||||
import org.adempiere.webui.AdempiereWebUI;
|
||||
import org.adempiere.webui.ClientInfo;
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
|
@ -71,6 +70,8 @@ import org.adempiere.webui.util.ZKUpdateUtil;
|
|||
import org.compiere.minigrid.ColumnInfo;
|
||||
import org.compiere.minigrid.IDColumn;
|
||||
import org.compiere.model.GridField;
|
||||
import org.compiere.model.InfoColumnVO;
|
||||
import org.compiere.model.InfoRelatedVO;
|
||||
import org.compiere.model.MInfoColumn;
|
||||
import org.compiere.model.MInfoWindow;
|
||||
import org.compiere.model.MPInstance;
|
||||
|
@ -135,7 +136,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
|
|||
protected final static String ATT_INFO_PROCESS_KEY = "INFO_PROCESS";
|
||||
protected int pageSize;
|
||||
public LinkedHashMap<KeyNamePair,LinkedHashMap<String, Object>> m_values = null;
|
||||
protected MInfoRelated[] relatedInfoList;
|
||||
protected InfoRelatedVO[] relatedInfoList;
|
||||
// for test disable load all record when num of record < 1000
|
||||
protected boolean isIgnoreCacheAll = true;
|
||||
// Num of page preload, default is 2 page before current and 2 page after current
|
||||
|
@ -791,7 +792,8 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
|
|||
if (modelHasInfoColumn.getInfoColumnID() <= 0 || listReadedColumn.contains(modelHasInfoColumn.getInfoColumnID()))
|
||||
continue;
|
||||
|
||||
MInfoColumn infoColumnAppend = (MInfoColumn) modelHasInfoColumn.getAD_InfoColumn();
|
||||
MInfoColumn infoColumnApp = (MInfoColumn) modelHasInfoColumn.getAD_InfoColumn();
|
||||
InfoColumnVO infoColumnAppend = new InfoColumnVO(Env.getCtx(), infoColumnApp);
|
||||
Object appendData = null;
|
||||
try {
|
||||
if (DisplayType.isID(infoColumnAppend.getAD_Reference_ID())) {
|
||||
|
|
|
@ -17,6 +17,7 @@ import org.compiere.model.MInfoWindow;
|
|||
import org.compiere.model.MProcess;
|
||||
import org.compiere.model.MTab;
|
||||
import org.compiere.model.MTask;
|
||||
import org.compiere.model.MUserDefInfo;
|
||||
import org.compiere.model.PO;
|
||||
import org.compiere.model.X_AD_CtxHelp;
|
||||
import org.compiere.util.DB;
|
||||
|
@ -364,7 +365,13 @@ public class WCtxHelpSuggestion extends Window implements EventListener<Event> {
|
|||
ctxHelp.setCtxType(X_AD_CtxHelp.CTXTYPE_Workflow);
|
||||
} else if (po instanceof MInfoWindow) {
|
||||
MInfoWindow info = (MInfoWindow) po;
|
||||
// Load User Def
|
||||
String name = info.getName();
|
||||
MUserDefInfo userDef = MUserDefInfo.getBestMatch(Env.getCtx(), info.getAD_InfoWindow_ID());
|
||||
if(userDef != null && !Util.isEmpty(userDef.getName())) {
|
||||
name = userDef.getName();
|
||||
}
|
||||
|
||||
String fullName = "Info " + name;
|
||||
if (fullName.length() <= 60) {
|
||||
ctxHelp.setName(fullName);
|
||||
|
|
Loading…
Reference in New Issue