Merge 64973314fe94

This commit is contained in:
Heng Sin Low 2013-02-08 11:17:14 +08:00
commit 416de5e925
34 changed files with 5596 additions and 27 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,252 @@
/******************************************************************************
* 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_CtxHelp
* @author iDempiere (generated)
* @version Release 1.0a
*/
public interface I_AD_CtxHelp
{
/** TableName=AD_CtxHelp */
public static final String Table_Name = "AD_CtxHelp";
/** AD_Table_ID=200063 */
public static final int Table_ID = 200063;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** 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_CtxHelp_ID */
public static final String COLUMNNAME_AD_CtxHelp_ID = "AD_CtxHelp_ID";
/** Set Context Help */
public void setAD_CtxHelp_ID (int AD_CtxHelp_ID);
/** Get Context Help */
public int getAD_CtxHelp_ID();
/** Column name AD_CtxHelp_UU */
public static final String COLUMNNAME_AD_CtxHelp_UU = "AD_CtxHelp_UU";
/** Set AD_CtxHelp_UU */
public void setAD_CtxHelp_UU (String AD_CtxHelp_UU);
/** Get AD_CtxHelp_UU */
public String getAD_CtxHelp_UU();
/** Column name AD_Form_ID */
public static final String COLUMNNAME_AD_Form_ID = "AD_Form_ID";
/** Set Special Form.
* Special Form
*/
public void setAD_Form_ID (int AD_Form_ID);
/** Get Special Form.
* Special Form
*/
public int getAD_Form_ID();
public org.compiere.model.I_AD_Form getAD_Form() throws RuntimeException;
/** 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_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_Process_ID */
public static final String COLUMNNAME_AD_Process_ID = "AD_Process_ID";
/** Set Process.
* Process or Report
*/
public void setAD_Process_ID (int AD_Process_ID);
/** Get Process.
* Process or Report
*/
public int getAD_Process_ID();
public org.compiere.model.I_AD_Process getAD_Process() throws RuntimeException;
/** Column name AD_Tab_ID */
public static final String COLUMNNAME_AD_Tab_ID = "AD_Tab_ID";
/** Set Tab.
* Tab within a Window
*/
public void setAD_Tab_ID (int AD_Tab_ID);
/** Get Tab.
* Tab within a Window
*/
public int getAD_Tab_ID();
public org.compiere.model.I_AD_Tab getAD_Tab() throws RuntimeException;
/** Column name AD_Task_ID */
public static final String COLUMNNAME_AD_Task_ID = "AD_Task_ID";
/** Set OS Task.
* Operation System Task
*/
public void setAD_Task_ID (int AD_Task_ID);
/** Get OS Task.
* Operation System Task
*/
public int getAD_Task_ID();
public org.compiere.model.I_AD_Task getAD_Task() throws RuntimeException;
/** Column name AD_Workflow_ID */
public static final String COLUMNNAME_AD_Workflow_ID = "AD_Workflow_ID";
/** Set Workflow.
* Workflow or combination of tasks
*/
public void setAD_Workflow_ID (int AD_Workflow_ID);
/** Get Workflow.
* Workflow or combination of tasks
*/
public int getAD_Workflow_ID();
public org.compiere.model.I_AD_Workflow getAD_Workflow() 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 CtxType */
public static final String COLUMNNAME_CtxType = "CtxType";
/** Set Content Type */
public void setCtxType (String CtxType);
/** Get Content Type */
public String getCtxType();
/** 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 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();
}

View File

@ -0,0 +1,164 @@
/******************************************************************************
* 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_CtxHelpMsg
* @author iDempiere (generated)
* @version Release 1.0a
*/
public interface I_AD_CtxHelpMsg
{
/** TableName=AD_CtxHelpMsg */
public static final String Table_Name = "AD_CtxHelpMsg";
/** AD_Table_ID=200064 */
public static final int Table_ID = 200064;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** 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_CtxHelp_ID */
public static final String COLUMNNAME_AD_CtxHelp_ID = "AD_CtxHelp_ID";
/** Set Context Help */
public void setAD_CtxHelp_ID (int AD_CtxHelp_ID);
/** Get Context Help */
public int getAD_CtxHelp_ID();
public org.compiere.model.I_AD_CtxHelp getAD_CtxHelp() throws RuntimeException;
/** Column name AD_CtxHelpMsg_ID */
public static final String COLUMNNAME_AD_CtxHelpMsg_ID = "AD_CtxHelpMsg_ID";
/** Set Context Help Message */
public void setAD_CtxHelpMsg_ID (int AD_CtxHelpMsg_ID);
/** Get Context Help Message */
public int getAD_CtxHelpMsg_ID();
/** Column name AD_CtxHelpMsg_UU */
public static final String COLUMNNAME_AD_CtxHelpMsg_UU = "AD_CtxHelpMsg_UU";
/** Set AD_CtxHelpMsg_UU */
public void setAD_CtxHelpMsg_UU (String AD_CtxHelpMsg_UU);
/** Get AD_CtxHelpMsg_UU */
public String getAD_CtxHelpMsg_UU();
/** 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 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 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 Line */
public static final String COLUMNNAME_Line = "Line";
/** Set Line No.
* Unique line for this document
*/
public void setLine (int Line);
/** Get Line No.
* Unique line for this document
*/
public int getLine();
/** Column name MsgText */
public static final String COLUMNNAME_MsgText = "MsgText";
/** Set Message Text.
* Textual Informational, Menu or Error Message
*/
public void setMsgText (String MsgText);
/** Get Message Text.
* Textual Informational, Menu or Error Message
*/
public String getMsgText();
/** 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();
}

View File

@ -0,0 +1,340 @@
/******************************************************************************
* 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_CtxHelp
* @author iDempiere (generated)
* @version Release 1.0a - $Id$ */
public class X_AD_CtxHelp extends PO implements I_AD_CtxHelp, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20130207L;
/** Standard Constructor */
public X_AD_CtxHelp (Properties ctx, int AD_CtxHelp_ID, String trxName)
{
super (ctx, AD_CtxHelp_ID, trxName);
/** if (AD_CtxHelp_ID == 0)
{
setAD_CtxHelp_ID (0);
setCtxType (null);
setName (null);
} */
}
/** Load Constructor */
public X_AD_CtxHelp (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
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()
{
StringBuffer sb = new StringBuffer ("X_AD_CtxHelp[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Context Help.
@param AD_CtxHelp_ID Context Help */
public void setAD_CtxHelp_ID (int AD_CtxHelp_ID)
{
if (AD_CtxHelp_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_CtxHelp_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_CtxHelp_ID, Integer.valueOf(AD_CtxHelp_ID));
}
/** Get Context Help.
@return Context Help */
public int getAD_CtxHelp_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_CtxHelp_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set AD_CtxHelp_UU.
@param AD_CtxHelp_UU AD_CtxHelp_UU */
public void setAD_CtxHelp_UU (String AD_CtxHelp_UU)
{
set_Value (COLUMNNAME_AD_CtxHelp_UU, AD_CtxHelp_UU);
}
/** Get AD_CtxHelp_UU.
@return AD_CtxHelp_UU */
public String getAD_CtxHelp_UU ()
{
return (String)get_Value(COLUMNNAME_AD_CtxHelp_UU);
}
public org.compiere.model.I_AD_Form getAD_Form() throws RuntimeException
{
return (org.compiere.model.I_AD_Form)MTable.get(getCtx(), org.compiere.model.I_AD_Form.Table_Name)
.getPO(getAD_Form_ID(), get_TrxName()); }
/** Set Special Form.
@param AD_Form_ID
Special Form
*/
public void setAD_Form_ID (int AD_Form_ID)
{
if (AD_Form_ID < 1)
set_Value (COLUMNNAME_AD_Form_ID, null);
else
set_Value (COLUMNNAME_AD_Form_ID, Integer.valueOf(AD_Form_ID));
}
/** Get Special Form.
@return Special Form
*/
public int getAD_Form_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Form_ID);
if (ii == null)
return 0;
return ii.intValue();
}
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_Value (COLUMNNAME_AD_InfoWindow_ID, null);
else
set_Value (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();
}
public org.compiere.model.I_AD_Process getAD_Process() throws RuntimeException
{
return (org.compiere.model.I_AD_Process)MTable.get(getCtx(), org.compiere.model.I_AD_Process.Table_Name)
.getPO(getAD_Process_ID(), get_TrxName()); }
/** Set Process.
@param AD_Process_ID
Process or Report
*/
public void setAD_Process_ID (int AD_Process_ID)
{
if (AD_Process_ID < 1)
set_Value (COLUMNNAME_AD_Process_ID, null);
else
set_Value (COLUMNNAME_AD_Process_ID, Integer.valueOf(AD_Process_ID));
}
/** Get Process.
@return Process or Report
*/
public int getAD_Process_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Process_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_AD_Tab getAD_Tab() throws RuntimeException
{
return (org.compiere.model.I_AD_Tab)MTable.get(getCtx(), org.compiere.model.I_AD_Tab.Table_Name)
.getPO(getAD_Tab_ID(), get_TrxName()); }
/** Set Tab.
@param AD_Tab_ID
Tab within a Window
*/
public void setAD_Tab_ID (int AD_Tab_ID)
{
if (AD_Tab_ID < 1)
set_Value (COLUMNNAME_AD_Tab_ID, null);
else
set_Value (COLUMNNAME_AD_Tab_ID, Integer.valueOf(AD_Tab_ID));
}
/** Get Tab.
@return Tab within a Window
*/
public int getAD_Tab_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Tab_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_AD_Task getAD_Task() throws RuntimeException
{
return (org.compiere.model.I_AD_Task)MTable.get(getCtx(), org.compiere.model.I_AD_Task.Table_Name)
.getPO(getAD_Task_ID(), get_TrxName()); }
/** Set OS Task.
@param AD_Task_ID
Operation System Task
*/
public void setAD_Task_ID (int AD_Task_ID)
{
if (AD_Task_ID < 1)
set_Value (COLUMNNAME_AD_Task_ID, null);
else
set_Value (COLUMNNAME_AD_Task_ID, Integer.valueOf(AD_Task_ID));
}
/** Get OS Task.
@return Operation System Task
*/
public int getAD_Task_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Task_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_AD_Workflow getAD_Workflow() throws RuntimeException
{
return (org.compiere.model.I_AD_Workflow)MTable.get(getCtx(), org.compiere.model.I_AD_Workflow.Table_Name)
.getPO(getAD_Workflow_ID(), get_TrxName()); }
/** Set Workflow.
@param AD_Workflow_ID
Workflow or combination of tasks
*/
public void setAD_Workflow_ID (int AD_Workflow_ID)
{
if (AD_Workflow_ID < 1)
set_Value (COLUMNNAME_AD_Workflow_ID, null);
else
set_Value (COLUMNNAME_AD_Workflow_ID, Integer.valueOf(AD_Workflow_ID));
}
/** Get Workflow.
@return Workflow or combination of tasks
*/
public int getAD_Workflow_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Workflow_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** CtxType AD_Reference_ID=200064 */
public static final int CTXTYPE_AD_Reference_ID=200064;
/** Tab = T */
public static final String CTXTYPE_Tab = "T";
/** Process = P */
public static final String CTXTYPE_Process = "P";
/** Form = F */
public static final String CTXTYPE_Form = "F";
/** Info = I */
public static final String CTXTYPE_Info = "I";
/** Workflow = W */
public static final String CTXTYPE_Workflow = "W";
/** Task = K */
public static final String CTXTYPE_Task = "K";
/** Home = H */
public static final String CTXTYPE_Home = "H";
/** Set Content Type.
@param CtxType Content Type */
public void setCtxType (String CtxType)
{
set_Value (COLUMNNAME_CtxType, CtxType);
}
/** Get Content Type.
@return Content Type */
public String getCtxType ()
{
return (String)get_Value(COLUMNNAME_CtxType);
}
/** 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 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);
}
}

View File

@ -0,0 +1,171 @@
/******************************************************************************
* 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_CtxHelpMsg
* @author iDempiere (generated)
* @version Release 1.0a - $Id$ */
public class X_AD_CtxHelpMsg extends PO implements I_AD_CtxHelpMsg, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20130207L;
/** Standard Constructor */
public X_AD_CtxHelpMsg (Properties ctx, int AD_CtxHelpMsg_ID, String trxName)
{
super (ctx, AD_CtxHelpMsg_ID, trxName);
/** if (AD_CtxHelpMsg_ID == 0)
{
setAD_CtxHelp_ID (0);
setAD_CtxHelpMsg_ID (0);
setLine (0);
// @SQL=SELECT COALESCE(MAX(Line),0)+10 AS DefaultValue FROM AD_CtxHelpMsg WHERE AD_CtxHelp_ID=@AD_CtxHelp_ID@
setMsgText (null);
} */
}
/** Load Constructor */
public X_AD_CtxHelpMsg (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
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()
{
StringBuffer sb = new StringBuffer ("X_AD_CtxHelpMsg[")
.append(get_ID()).append("]");
return sb.toString();
}
public org.compiere.model.I_AD_CtxHelp getAD_CtxHelp() throws RuntimeException
{
return (org.compiere.model.I_AD_CtxHelp)MTable.get(getCtx(), org.compiere.model.I_AD_CtxHelp.Table_Name)
.getPO(getAD_CtxHelp_ID(), get_TrxName()); }
/** Set Context Help.
@param AD_CtxHelp_ID Context Help */
public void setAD_CtxHelp_ID (int AD_CtxHelp_ID)
{
if (AD_CtxHelp_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_CtxHelp_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_CtxHelp_ID, Integer.valueOf(AD_CtxHelp_ID));
}
/** Get Context Help.
@return Context Help */
public int getAD_CtxHelp_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_CtxHelp_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Context Help Message.
@param AD_CtxHelpMsg_ID Context Help Message */
public void setAD_CtxHelpMsg_ID (int AD_CtxHelpMsg_ID)
{
if (AD_CtxHelpMsg_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_CtxHelpMsg_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_CtxHelpMsg_ID, Integer.valueOf(AD_CtxHelpMsg_ID));
}
/** Get Context Help Message.
@return Context Help Message */
public int getAD_CtxHelpMsg_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_CtxHelpMsg_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set AD_CtxHelpMsg_UU.
@param AD_CtxHelpMsg_UU AD_CtxHelpMsg_UU */
public void setAD_CtxHelpMsg_UU (String AD_CtxHelpMsg_UU)
{
set_Value (COLUMNNAME_AD_CtxHelpMsg_UU, AD_CtxHelpMsg_UU);
}
/** Get AD_CtxHelpMsg_UU.
@return AD_CtxHelpMsg_UU */
public String getAD_CtxHelpMsg_UU ()
{
return (String)get_Value(COLUMNNAME_AD_CtxHelpMsg_UU);
}
/** Set Line No.
@param Line
Unique line for this document
*/
public void setLine (int Line)
{
set_Value (COLUMNNAME_Line, Integer.valueOf(Line));
}
/** Get Line No.
@return Unique line for this document
*/
public int getLine ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Line);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Message Text.
@param MsgText
Textual Informational, Menu or Error Message
*/
public void setMsgText (String MsgText)
{
set_Value (COLUMNNAME_MsgText, MsgText);
}
/** Get Message Text.
@return Textual Informational, Menu or Error Message
*/
public String getMsgText ()
{
return (String)get_Value(COLUMNNAME_MsgText);
}
}

View File

@ -48,6 +48,7 @@ import org.adempiere.webui.editor.WImageEditor;
import org.adempiere.webui.editor.WPaymentEditor;
import org.adempiere.webui.editor.WebEditorFactory;
import org.adempiere.webui.event.ContextMenuListener;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.GridTabDataBinder;
import org.adempiere.webui.util.TreeUtils;
import org.adempiere.webui.window.FDialog;
@ -499,6 +500,9 @@ DataStatusListener, IADTabpanel, IdSpace
if (editor != null) // Not heading
{
editor.getComponent().addEventListener(Events.ON_FOCUS, this);
editor.getComponent().addEventListener(Events.ON_BLUR, this);
editor.setGridTab(this.getGridTab());
field.addPropertyChangeListener(editor);
editors.add(editor);
@ -1016,6 +1020,26 @@ DataStatusListener, IADTabpanel, IdSpace
Env.getCtx().setProperty("P"+windowId+"|"+adTabId+"|DetailPane.IsOpen", value ? "Y" : "N");
}
}
else if (event.getName().equals(Events.ON_FOCUS)) {
for (WEditor editor : editors)
{
if (editor.isComponentOfEditor(event.getTarget()))
{
SessionManager.getAppDesktop().updateHelpTooltip(editor.getGridField());
return;
}
}
}
else if (event.getName().equals(Events.ON_BLUR)) {
for (WEditor editor : editors)
{
if (editor.isComponentOfEditor(event.getTarget()))
{
SessionManager.getAppDesktop().updateHelpTooltip(null);
return;
}
}
}
}
private boolean isOpenDetailPane() {

View File

@ -28,7 +28,9 @@ import java.util.Properties;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.Tabpanel;
import org.adempiere.webui.panel.ITabOnCloseHandler;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.util.CLogger;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Page;
@ -114,6 +116,8 @@ public class ADWindowContent extends AbstractADWindowContent
SessionManager.getSessionApplication().getKeylistener().addEventListener(Events.ON_CTRL_KEY, this);
layout.addEventListener(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, this);
return layout;
}
@ -143,7 +147,11 @@ public class ADWindowContent extends AbstractADWindowContent
}
}
}
} else {
}
else if (event.getName().equals(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT)) {
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Tab, adTabbox.getSelectedGridTab().getAD_Tab_ID());
}
else {
super.onEvent(event);
}
}

View File

@ -85,6 +85,7 @@ import org.compiere.model.MProcess;
import org.compiere.model.MQuery;
import org.compiere.model.MRecentItem;
import org.compiere.model.MRole;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.process.DocAction;
import org.compiere.process.ProcessInfo;
import org.compiere.process.ProcessInfoLog;
@ -365,6 +366,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
toolbar.updateToolbarAccess(adWindowId);
updateToolbar();
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Tab, adTabbox.getSelectedGridTab().getAD_Tab_ID());
return true;
}
@ -1010,6 +1013,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
}
});
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Tab, adTabbox.getSelectedGridTab().getAD_Tab_ID());
}
}
else if (event.getTarget() instanceof ProcessModalDialog)

View File

@ -26,12 +26,14 @@ import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.desktop.IDesktop;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.process.WProcessInfo;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.MultiFileDownloadDialog;
import org.adempiere.webui.window.SimplePDFViewer;
import org.compiere.Adempiere;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.print.ReportEngine;
import org.compiere.process.ProcessInfo;
import org.compiere.process.ProcessInfoLog;
@ -124,7 +126,6 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
*/
public ProcessDialog (int AD_Process_ID, boolean isSOTrx)
{
log.info("Process=" + AD_Process_ID );
m_ctx = Env.getCtx();
m_WindowNo = SessionManager.getAppDesktop().registerWindow(this);
@ -135,6 +136,7 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
{
initComponents();
init();
addEventListener(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, this);
}
catch(Exception ex)
{
@ -403,6 +405,8 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
onStatusUpdate(event);
} else if (event.getName().equals(ON_COMPLETE)) {
onComplete();
} else if (event.getName().equals(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT)) {
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Process, m_AD_Process_ID);
}
}

View File

@ -35,6 +35,7 @@ import org.adempiere.webui.editor.WebEditorFactory;
import org.adempiere.webui.event.ContextMenuListener;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.IProcessParameter;
import org.compiere.model.GridField;
@ -47,6 +48,9 @@ import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Div;
import org.zkoss.zul.Hbox;
import org.zkoss.zul.Label;
@ -60,7 +64,7 @@ import org.zkoss.zul.Label;
* @version 2006-12-01
*/
public class ProcessParameterPanel extends Panel implements
ValueChangeListener, IProcessParameter {
ValueChangeListener, IProcessParameter, EventListener<Event> {
/**
*
*/
@ -269,6 +273,8 @@ public class ProcessParameterPanel extends Panel implements
// The Editor
WEditor editor = WebEditorFactory.getEditor(mField, false);
editor.getComponent().addEventListener(Events.ON_FOCUS, this);
editor.getComponent().addEventListener(Events.ON_BLUR, this);
editor.addValueChangeListener(this);
editor.dynamicDisplay();
// MField => VEditor - New Field value to be updated to editor
@ -307,6 +313,8 @@ public class ProcessParameterPanel extends Panel implements
WEditor editor2 = WebEditorFactory.getEditor(mField2, false);
//override attribute
editor2.getComponent().setWidgetAttribute("columnName", mField2.getColumnName()+"_To");
editor2.getComponent().addEventListener(Events.ON_FOCUS, this);
editor2.getComponent().addEventListener(Events.ON_BLUR, this);
// New Field value to be updated to editor
mField2.addPropertyChangeListener(editor2);
editor2.dynamicDisplay();
@ -492,6 +500,48 @@ public class ProcessParameterPanel extends Panel implements
processNewValue(evt.getNewValue(), evt.getPropertyName());
}
@Override
public void onEvent(Event event) throws Exception {
if (event.getName().equals(Events.ON_FOCUS)) {
for (WEditor editor : m_wEditors)
{
if (editor.isComponentOfEditor(event.getTarget()))
{
SessionManager.getAppDesktop().updateHelpTooltip(editor.getGridField());
return;
}
}
for (WEditor editor : m_wEditors2)
{
if (editor != null && editor.getComponent() != null && editor.isComponentOfEditor(event.getTarget()))
{
SessionManager.getAppDesktop().updateHelpTooltip(editor.getGridField());
return;
}
}
}
else if (event.getName().equals(Events.ON_BLUR)) {
for (WEditor editor : m_wEditors)
{
if (editor.isComponentOfEditor(event.getTarget()))
{
SessionManager.getAppDesktop().updateHelpTooltip(null);
return;
}
}
for (WEditor editor : m_wEditors2)
{
if (editor != null && editor.getComponent() != null && editor.isComponentOfEditor(event.getTarget()))
{
SessionManager.getAppDesktop().updateHelpTooltip(null);
return;
}
}
}
}
/**
* Evaluate Dependencies
* @param changedField changed field
@ -603,5 +653,6 @@ public class ProcessParameterPanel extends Panel implements
public void setProcessInfo(ProcessInfo processInfo) {
m_processInfo = processInfo;
}
} // ProcessParameterPanel

View File

@ -304,7 +304,7 @@ public class WAttributeGrid extends ADForm implements EventListener<Event>
}
} // fillPicks
public void onEvent(Event e)
public void onEvent(Event e) throws Exception
{
if (e.getTarget() instanceof Tab)
{
@ -322,6 +322,10 @@ public class WAttributeGrid extends ADForm implements EventListener<Event>
}
else if (e.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
onClose();
else
{
super.onEvent(e);
}
} // actionPerformed
private void gridOK()

View File

@ -667,6 +667,10 @@ public class WBOMDrop extends ADForm implements EventListener<Event>
}
else if (confirmPanel.getButton("Cancel").equals(e.getTarget()))
SessionManager.getAppDesktop().closeActiveWindow();
else
{
super.onEvent(e);
}
// Enable OK
boolean OK = m_product != null;

View File

@ -163,6 +163,10 @@ public class WCreateFromForm extends ADForm implements EventListener<Event>, WTa
dataTable.setModel(model);
info();
}
else
{
super.onEvent(e);
}
}
public void tableChanged (WTableModelEvent e)

View File

@ -318,6 +318,10 @@ public class WFileImport extends ADForm implements EventListener<Event>
SessionManager.getAppDesktop().closeActiveWindow();
return;
}
else
{
super.onEvent(e);
}
if (m_data != null && m_data.size() > 0 // file loaded
&& m_format != null && m_format.getRowCount() > 0) // format loaded

View File

@ -243,7 +243,7 @@ public class WGenForm extends ADForm implements EventListener<Event>, WTableMode
* Action Listener
* @param e event
*/
public void onEvent(Event e)
public void onEvent(Event e) throws Exception
{
log.info("Cmd=" + e.getTarget().getId());
//
@ -262,6 +262,10 @@ public class WGenForm extends ADForm implements EventListener<Event>, WTableMode
genForm.setSelectionActive(index == 0);
return;
}
else
{
super.onEvent(e);
}
genForm.validate();
} // actionPerformed

View File

@ -271,5 +271,6 @@ public class WSQLProcess extends ADForm implements EventListener<Event>
public void onEvent(Event event) throws Exception
{
m_txbResultField.setText(processStatements (m_txbSqlField.getText(), false));
super.onEvent(event);
}
}

View File

@ -19,9 +19,11 @@ import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
import org.compiere.apps.wf.WFGraphLayout;
import org.compiere.apps.wf.WFNodeWidget;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.wf.MWFNode;
@ -60,6 +62,7 @@ public class WFPanel extends Borderlayout implements EventListener<Event>
try
{
jbInit();
addEventListener(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, this);
}
catch(Exception e)
{
@ -269,6 +272,8 @@ public class WFPanel extends Borderlayout implements EventListener<Event>
}
}
}
else if (event.getName().equals(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT))
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Workflow, m_wf.getAD_Workflow_ID());
}
private void start(MWFNode wfn) {

View File

@ -282,12 +282,17 @@ public class WWFActivity extends ADForm implements EventListener<Event>
}
else if (comp == fAnswerButton)
cmd_button();
} else if (Events.ON_SELECT.equals(eventName) && comp == listbox)
}
else if (Events.ON_SELECT.equals(eventName) && comp == listbox)
{
m_index = listbox.getSelectedIndex();
if (m_index >= 0)
display(m_index);
}
else
{
super.onEvent(event);
}
}
/**

View File

@ -443,4 +443,9 @@ public class NumberBox extends Div
{
return decimalBox;
}
public Button getButton()
{
return btn;
}
}

View File

@ -36,6 +36,7 @@ import org.adempiere.webui.dashboard.DashboardPanel;
import org.adempiere.webui.dashboard.DashboardRunnable;
import org.adempiere.webui.event.DrillEvent;
import org.adempiere.webui.event.ZoomEvent;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.report.HTMLExtension;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.window.FDialog;
@ -53,6 +54,7 @@ import org.compiere.model.MQuery;
import org.compiere.model.MRole;
import org.compiere.model.MSysConfig;
import org.compiere.model.MTable;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.print.ReportEngine;
import org.compiere.process.ProcessInfo;
import org.compiere.util.CLogger;
@ -109,6 +111,8 @@ public class DashboardController implements EventListener<Event> {
maximizedHolder = new Anchorchildren();
maximizedHolder.setAnchor("100% 100%");
maximizedHolder.setStyle("overflow: hidden; border: none; margin: 0; padding: 0;");
dashboardLayout.addEventListener(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, this);
}
public void render(Component parent, IDesktop desktopImpl, boolean isShowInDashboard) {
@ -520,6 +524,9 @@ public class DashboardController implements EventListener<Event> {
}
}
}
else if (event.getName().equals(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT)) {
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Home, 0);
}
}
private void createDashboardPreference()

View File

@ -28,12 +28,15 @@ import org.adempiere.model.MBroadcastMessage;
import org.adempiere.util.ServerContext;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.apps.BusyDialog;
import org.adempiere.webui.apps.ProcessDialog;
import org.adempiere.webui.component.Tabpanel;
import org.adempiere.webui.component.ToolBarButton;
import org.adempiere.webui.event.MenuListener;
import org.adempiere.webui.event.ZKBroadCastManager;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.BroadcastMessageWindow;
import org.adempiere.webui.panel.HeaderPanel;
import org.adempiere.webui.panel.HelpController;
import org.adempiere.webui.panel.TimeoutPanel;
import org.adempiere.webui.session.SessionContextListener;
import org.adempiere.webui.session.SessionManager;
@ -41,6 +44,8 @@ import org.adempiere.webui.util.IServerPushCallback;
import org.adempiere.webui.util.ServerPushTemplate;
import org.adempiere.webui.util.UserPreference;
import org.compiere.Adempiere;
import org.compiere.model.GridField;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@ -65,6 +70,7 @@ import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zk.ui.util.DesktopCleanup;
import org.zkoss.zul.Borderlayout;
import org.zkoss.zul.Center;
import org.zkoss.zul.East;
import org.zkoss.zul.North;
import org.zkoss.zul.West;
@ -77,7 +83,7 @@ import org.zkoss.zul.West;
* @version $Revision: 0.10 $
* @author Deepak Pansheriya/Vivek - Adding support for message broadcasting
*/
public class DefaultDesktop extends TabbedDesktop implements MenuListener, Serializable, EventListener<Event>, EventHandler,DesktopCleanup
public class DefaultDesktop extends TabbedDesktop implements MenuListener, Serializable, EventListener<Event>, EventHandler, DesktopCleanup
{
/**
* generated serial version ID
@ -110,11 +116,14 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
private Desktop m_desktop = null;
private TimeoutPanel panel = null;
private HelpController helpController;
public DefaultDesktop()
{
super();
dashboardController = new DashboardController();
sideController = new DashboardController();
helpController = new HelpController();
m_desktop = AEnv.getDesktop();
m_desktop.addListener(this);
@ -169,6 +178,27 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
sideController.render(w, this, false);
East e = new East();
e.setId("desktop-right-column");
layout.appendChild(e);
e.setSclass("desktop-right-column");
e.setCollapsible(true);
e.setSplittable(true);
e.setHflex("1");
e.addEventListener(Events.ON_OPEN, new EventListener<Event>() {
@Override
public void onEvent(Event event) throws Exception {
OpenEvent oe = (OpenEvent) event;
UserPreference pref = SessionManager.getSessionApplication().getUserPreference();
pref.setProperty(UserPreference.P_HELP_COLLAPSED, !oe.isOpen());
pref.savePreference();
}
});
boolean helpCollapsed= pref.isPropertyBool(UserPreference.P_HELP_COLLAPSED);
e.setOpen(!helpCollapsed);
helpController.render(e, this);
windowArea = new Center();
windowArea.setParent(layout);
windowArea.setSclass("desktop-center");
@ -220,7 +250,6 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
private void renderHomeTab()
{
homeTab.getChildren().clear();
//register as 0
@ -435,6 +464,47 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
@Override
public void cleanup(Desktop desktop) throws Exception {
unbindEventManager();
}
@Override
public void updateHelpContext(String ctxType, int recordId) {
helpController.renderCtxHelp(ctxType, recordId);
}
@Override
public void updateHelpTooltip(GridField gridField) {
helpController.renderToolTip(gridField);
}
@Override
public ProcessDialog openProcessDialog(int processId, boolean soTrx) {
ProcessDialog pd = super.openProcessDialog(processId, soTrx);
updateHelpContext(X_AD_CtxHelp.CTXTYPE_Process, processId);
return pd;
}
@Override
public ADForm openForm(int formId) {
ADForm form = super.openForm(formId);
updateHelpContext(X_AD_CtxHelp.CTXTYPE_Form, formId);
return form;
}
@Override
public void openInfo(int infoId) {
super.openInfo(infoId);
updateHelpContext(X_AD_CtxHelp.CTXTYPE_Info, infoId);
}
@Override
public void openWorkflow(int workflow_ID) {
super.openWorkflow(workflow_ID);
updateHelpContext(X_AD_CtxHelp.CTXTYPE_Workflow, workflow_ID);
}
@Override
public void openTask(int taskId) {
super.openTask(taskId);
updateHelpContext(X_AD_CtxHelp.CTXTYPE_Task, taskId);
}
}

View File

@ -20,6 +20,7 @@ import org.adempiere.webui.apps.ProcessDialog;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.part.UIPart;
import org.compiere.model.GridField;
import org.compiere.model.MQuery;
import org.compiere.util.WebDoc;
import org.zkoss.zk.ui.Component;
@ -194,4 +195,8 @@ public interface IDesktop extends UIPart {
* User logout from desktop, do clean up
*/
public void logout();
public void updateHelpContext(String ctxType, int recordId);
public void updateHelpTooltip(GridField gridField);
}

View File

@ -27,7 +27,11 @@ import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.Bandbox;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Datebox;
import org.adempiere.webui.component.DatetimeBox;
import org.adempiere.webui.component.EditorBox;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.NumberBox;
import org.adempiere.webui.component.Paymentbox;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.window.WFieldRecordInfo;
@ -602,6 +606,44 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
popupMenu.appendChild(editor);
}
public boolean isComponentOfEditor(Component comp) {
if (comp == getComponent())
return true;
if (getComponent() instanceof EditorBox)
{
EditorBox component = (EditorBox) getComponent();
if (comp == component.getTextbox())
return true;
if (comp == component.getButton())
return true;
}
else if (getComponent() instanceof DatetimeBox)
{
DatetimeBox component = (DatetimeBox) getComponent();
if (comp == component.getDatebox())
return true;
if (comp == component.getTimebox())
return true;
}
else if (getComponent() instanceof NumberBox)
{
NumberBox component = (NumberBox) getComponent();
if (comp == component.getDecimalbox())
return true;
if (comp == component.getButton())
return true;
}
else if (getComponent() instanceof Paymentbox)
{
Paymentbox component = (Paymentbox) getComponent();
if (comp == component.getCombobox())
return true;
if (comp == component.getButton())
return true;
}
return false;
}
private static final String STYLE_ZOOMABLE_LABEL = "cursor: pointer; text-decoration: underline;";
private static final String STYLE_NORMAL_LABEL = "color: #333;";
private static final String STYLE_EMPTY_MANDATORY_LABEL = "color: red;";

View File

@ -26,6 +26,7 @@ import org.adempiere.webui.editor.WebEditorFactory;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.panel.InfoPanel;
import org.adempiere.webui.session.SessionManager;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
import org.compiere.model.AccessSqlParser;
@ -47,6 +48,9 @@ import org.compiere.util.Msg;
import org.compiere.util.Util;
import org.compiere.util.ValueNamePair;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Page;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Borderlayout;
import org.zkoss.zul.Center;
@ -63,7 +67,7 @@ import org.zkoss.zul.Vbox;
* @author hengsin
*
*/
public class InfoWindow extends InfoPanel implements ValueChangeListener {
public class InfoWindow extends InfoPanel implements ValueChangeListener, EventListener<Event> {
/**
* generated serial id
@ -204,6 +208,8 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
vo.ValidationCode = infoColumn.getAD_Val_Rule().getCode();
}
vo.DisplayLogic = infoColumn.getDisplayLogic() != null ? infoColumn.getDisplayLogic() : "";
vo.Description = infoColumn.getDescription() != null ? infoColumn.getDescription() : "";
vo.Help = infoColumn.getHelp() != null ? infoColumn.getHelp() : "";
GridField gridField = new GridField(vo);
gridFields.add(gridField);
}
@ -633,7 +639,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
identifiers.add(editor);
}
fieldEditor.addEventListener(Events.ON_OK,this);
fieldEditor.addEventListener(Events.ON_OK, this);
} // addSelectionColumn
protected void addSearchParameter(Label label, Component fieldEditor) {
@ -813,4 +819,44 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
}
}
public void onEvent(Event event)
{
if (event.getName().equals(Events.ON_FOCUS)) {
for (WEditor editor : editors)
{
if (editor.isComponentOfEditor(event.getTarget()))
{
SessionManager.getAppDesktop().updateHelpTooltip(editor.getGridField());
return;
}
}
}
else if (event.getName().equals(Events.ON_BLUR)) {
for (WEditor editor : editors)
{
if (editor.isComponentOfEditor(event.getTarget()))
{
SessionManager.getAppDesktop().updateHelpTooltip(null);
return;
}
}
}
else
{
super.onEvent(event);
}
}
@Override
public void onPageAttached(Page newpage, Page oldpage) {
super.onPageAttached(newpage, oldpage);
if (newpage != null) {
for (WEditor editor : editors)
{
editor.getComponent().addEventListener(Events.ON_FOCUS, this);
editor.getComponent().addEventListener(Events.ON_BLUR, this);
}
}
}
}

View File

@ -22,10 +22,12 @@ import java.util.logging.Level;
import org.adempiere.webui.Extensions;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.exception.ApplicationException;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ADClassNameMap;
import org.compiere.model.GridTab;
import org.compiere.model.MForm;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.process.ProcessInfo;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
@ -112,6 +114,8 @@ public abstract class ADForm extends Window implements EventListener<Event>
m_name = name;
initForm();
addEventListener(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, this);
}
abstract protected void initForm();
@ -376,9 +380,11 @@ public abstract class ADForm extends Window implements EventListener<Event>
/**
*
*/
public void onEvent(Event arg0) throws Exception
public void onEvent(Event event) throws Exception
{
if (event.getName().equals(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT)) {
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Form, getAdFormId());
}
}
/**

View File

@ -0,0 +1,350 @@
/******************************************************************************
* Copyright (C) 2013 Elaine Tan *
* Copyright (C) 2013 Trek Global
* 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. *
*****************************************************************************/
package org.adempiere.webui.panel;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.webui.desktop.IDesktop;
import org.compiere.model.GridField;
import org.compiere.model.MForm;
import org.compiere.model.MInfoWindow;
import org.compiere.model.MProcess;
import org.compiere.model.MTab;
import org.compiere.model.MTask;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.model.X_AD_CtxHelpMsg;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.wf.MWorkflow;
import org.zkoss.zk.ui.Component;
import org.zkoss.zul.Anchorchildren;
import org.zkoss.zul.Anchorlayout;
import org.zkoss.zul.Html;
import org.zkoss.zul.Panel;
import org.zkoss.zul.Panelchildren;
import org.zkoss.zul.Style;
import org.zkoss.zul.Vlayout;
/**
*
* @author Elaine
*
*/
public class HelpController
{
private Anchorlayout dashboardLayout;
private Panel pnlToolTip, pnlContextHelp;
private Html htmlToolTip, htmlContextHelp;
public HelpController()
{
dashboardLayout = new Anchorlayout();
dashboardLayout.setSclass("dashboard-layout");
dashboardLayout.setVflex("1");
dashboardLayout.setHflex("1");
}
public void render(Component parent, IDesktop desktopImpl)
{
Style style = new Style();
style.setContent(".z-anchorlayout-body { overflow:auto } .z-anchorchildren { overflow:visible } ");
style.setPage(parent.getPage());
parent.appendChild(dashboardLayout);
Vlayout dashboardColumnLayout = new Vlayout();
dashboardColumnLayout.setHflex("1");
Anchorchildren dashboardColumn = new Anchorchildren();
dashboardColumn.setAnchor("95% 100%");
dashboardColumn.appendChild(dashboardColumnLayout);
dashboardLayout.appendChild(dashboardColumn);
pnlToolTip = new Panel();
pnlToolTip.setSclass("dashboard-widget");
pnlToolTip.setTitle(Msg.getMsg(Env.getCtx(), "ToolTip"));
pnlToolTip.setMaximizable(false);
pnlToolTip.setCollapsible(true);
pnlToolTip.setOpen(true);
pnlToolTip.setBorder("normal");
dashboardColumnLayout.appendChild(pnlToolTip);
Panelchildren content = new Panelchildren();
pnlToolTip.appendChild(content);
content.appendChild(htmlToolTip = new Html());
pnlContextHelp = new Panel();
pnlContextHelp.setSclass("dashboard-widget");
pnlContextHelp.setTitle(Msg.getMsg(Env.getCtx(), "HowTo"));
pnlContextHelp.setMaximizable(false);
pnlContextHelp.setCollapsible(true);
pnlContextHelp.setOpen(true);
pnlContextHelp.setBorder("normal");
dashboardColumnLayout.appendChild(pnlContextHelp);
content = new Panelchildren();
pnlContextHelp.appendChild(content);
content.appendChild(htmlContextHelp = new Html());
renderToolTip(null);
renderCtxHelp(X_AD_CtxHelp.CTXTYPE_Home, 0);
}
public void renderToolTip(GridField field)
{
StringBuilder sb = new StringBuilder();
sb.append("<html>\n<body>\n<div class=\"content\">\n");
if (field != null)
{
String hdr = field.getHeader();
if (hdr != null && hdr.length() > 0)
{
sb.append("<b>" + hdr + "</b>");
if (field.getDescription().length() != 0)
sb.append("<br><br>\n<i>" + field.getDescription() + "</i>");
if (field.getHelp().length() != 0)
sb.append("<br><br>\n" + field.getHelp());
}
}
else
{
sb.append("<i>(" + Msg.getMsg(Env.getCtx(), "PlaceCursorIntoField") + ")</i>");
}
sb.append("</div>\n</body>\n</html>");
htmlToolTip.setContent(sb.toString());
}
public void renderCtxHelp(String ctxType, int recordId)
{
pnlToolTip.setVisible(ctxType.equals(X_AD_CtxHelp.CTXTYPE_Tab) ||
ctxType.equals(X_AD_CtxHelp.CTXTYPE_Process) ||
ctxType.equals(X_AD_CtxHelp.CTXTYPE_Info));
pnlContextHelp.setTitle(ctxType.equals(X_AD_CtxHelp.CTXTYPE_Home) ? Msg.getMsg(Env.getCtx(), "GettingStarted") : Msg.getMsg(Env.getCtx(), "HowTo"));
StringBuilder sb = new StringBuilder();
sb.append("<html>\n<body>\n<div class=\"content\">\n");
String[] ctxHelpMsgList = getCtxHelpMsgList(ctxType, recordId);
if (ctxHelpMsgList.length > 0)
{
for (String ctxHelpMsg : ctxHelpMsgList)
sb.append(stripHtml(ctxHelpMsg, false) + "<br>\n");
}
else
{
sb.append("<i>(" + Msg.getMsg(Env.getCtx(), "NotAvailable") + ")</i>");
if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Tab))
{
MTab tab = new MTab(Env.getCtx(), recordId, null);
if (tab != null && tab.getName() != null && tab.getName().length() != 0)
{
sb.append("<br><br>\n<b>" + tab.getName() + "</b>");
if (tab.getDescription() != null && tab.getDescription().length() != 0)
sb.append("<br><br>\n<i>" + tab.getDescription() + "</i>");
if (tab.getHelp() != null && tab.getHelp().length() != 0)
sb.append("<br><br>\n" + tab.getHelp());
}
}
else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Process))
{
MProcess process = new MProcess(Env.getCtx(), recordId, null);
if (process != null && process.getName() != null && process.getName().length() != 0)
{
sb.append("<br><br>\n<b>" + process.getName() + "</b>");
if (process.getDescription() != null && process.getDescription().length() != 0)
sb.append("<br><br>\n<i>" + process.getDescription() + "</i>");
if (process.getHelp() != null && process.getHelp().length() != 0)
sb.append("<br><br>\n" + process.getHelp());
}
}
else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Form))
{
MForm form = new MForm(Env.getCtx(), recordId, null);
if (form != null && form.getName() != null && form.getName().length() != 0)
{
sb.append("<br><br>\n<b>" + form.getName() + "</b>");
if (form.getDescription() != null && form.getDescription().length() != 0)
sb.append("<br><br>\n<i>" + form.getDescription() + "</i>");
if (form.getHelp() != null && form.getHelp().length() != 0)
sb.append("<br><br>\n" + form.getHelp());
}
}
else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Info))
{
MInfoWindow info = new MInfoWindow(Env.getCtx(), recordId, null);
if (info != null && info.getName() != null && info.getName().length() != 0)
{
sb.append("<br><br>\n<b>" + info.getName() + "</b>");
if (info.getDescription() != null && info.getDescription().length() != 0)
sb.append("<br><br>\n<i>" + info.getDescription() + "</i>");
if (info.getHelp() != null && info.getHelp().length() != 0)
sb.append("<br><br>\n" + info.getHelp());
}
}
else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Workflow))
{
MWorkflow workflow = new MWorkflow(Env.getCtx(), recordId, null);
if (workflow != null && workflow.getName() != null && workflow.getName().length() != 0)
{
sb.append("<br><br>\n<b>" + workflow.getName() + "</b>");
if (workflow.getDescription() != null && workflow.getDescription().length() != 0)
sb.append("<br><br>\n<i>" + workflow.getDescription() + "</i>");
if (workflow.getHelp() != null && workflow.getHelp().length() != 0)
sb.append("<br><br>\n" + workflow.getHelp());
}
}
else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Task))
{
MTask task = new MTask(Env.getCtx(), recordId, null);
if (task != null && task.getName() != null && task.getName().length() != 0)
{
sb.append("<br><br>\n<b>" + task.getName() + "</b>");
if (task.getDescription() != null && task.getDescription().length() != 0)
sb.append("<br><br>\n<i>" + task.getDescription() + "</i>");
if (task.getHelp() != null && task.getHelp().length() != 0)
sb.append("<br><br>\n" + task.getHelp());
}
}
}
sb.append("</div>\n</body>\n</html>");
htmlContextHelp.setContent(sb.toString());
}
private String stripHtml(String htmlString, boolean all)
{
htmlString = htmlString
.replace("<html>", "")
.replace("</html>", "")
.replace("<body>", "")
.replace("</body>", "")
.replace("<head>", "")
.replace("</head>", "");
if (all)
htmlString = htmlString
.replace(">", "&gt;")
.replace("<", "&lt;");
return htmlString;
}
private int getCtxHelpID(String ctxType, int recordId)
{
Properties ctx = Env.getCtx();
StringBuilder sql = new StringBuilder();
sql.append("SELECT AD_CtxHelp_ID ");
sql.append("FROM AD_CtxHelp ");
sql.append("WHERE IsActive = 'Y' ");
sql.append("AND AD_Client_ID IN (0, ?) ");
sql.append("AND AD_Org_ID IN (0, ?) ");
sql.append("AND CtxType = ? ");
if (ctxType == X_AD_CtxHelp.CTXTYPE_Tab)
sql.append("AND " + X_AD_CtxHelp.COLUMNNAME_AD_Tab_ID + " = ? ");
else if (ctxType == X_AD_CtxHelp.CTXTYPE_Process)
sql.append("AND " + X_AD_CtxHelp.COLUMNNAME_AD_Process_ID + " = ? ");
else if (ctxType == X_AD_CtxHelp.CTXTYPE_Form)
sql.append("AND " + X_AD_CtxHelp.COLUMNNAME_AD_Form_ID + " = ? ");
else if (ctxType == X_AD_CtxHelp.CTXTYPE_Info)
sql.append("AND " + X_AD_CtxHelp.COLUMNNAME_AD_InfoWindow_ID + " = ? ");
else if (ctxType == X_AD_CtxHelp.CTXTYPE_Workflow)
sql.append("AND " + X_AD_CtxHelp.COLUMNNAME_AD_Workflow_ID + " = ? ");
else if (ctxType == X_AD_CtxHelp.CTXTYPE_Task)
sql.append("AND " + X_AD_CtxHelp.COLUMNNAME_AD_Task_ID + " = ? ");
else
sql.append("AND 0 = ? ");
sql.append("ORDER BY AD_Client_ID DESC, AD_Org_ID DESC");
return DB.getSQLValue(null, sql.toString(), Env.getAD_Client_ID(ctx), Env.getAD_Org_ID(ctx), ctxType, recordId);
}
private String[] getCtxHelpMsgList(String ctxType, int recordId)
{
List<String> list = new ArrayList<String>();
int AD_CtxHelp_ID = getCtxHelpID(ctxType, recordId);
if (AD_CtxHelp_ID > 0)
{
StringBuilder sql = new StringBuilder();
if (Env.isBaseLanguage(Env.getCtx(), X_AD_CtxHelpMsg.Table_Name))
{
sql.append("SELECT MsgText ");
sql.append("FROM AD_CtxHelpMsg ");
sql.append("WHERE IsActive = 'Y' ");
sql.append("AND AD_CtxHelp_ID = ? ");
sql.append("ORDER BY Line ");
}
else
{
sql.append("SELECT mt.MsgText ");
sql.append("FROM AD_CtxHelpMsg m ");
sql.append("LEFT JOIN AD_CtxHelpMsg_Trl mt ON (mt.AD_CtxHelpMsg_ID = m.AD_CtxHelpMsg_ID AND mt.AD_Language = ?) ");
sql.append("WHERE mt.IsActive = 'Y' ");
sql.append("AND m.AD_CtxHelp_ID = ? ");
sql.append("ORDER BY m.Line ");
}
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql.toString(), null);
int count = 1;
if (!Env.isBaseLanguage(Env.getCtx(), X_AD_CtxHelpMsg.Table_Name))
pstmt.setString(count++, Env.getAD_Language(Env.getCtx()));
pstmt.setInt(count++, AD_CtxHelp_ID);
rs = pstmt.executeQuery();
while (rs.next())
{
list.add(rs.getString("MsgText"));
}
}
catch (Exception e)
{
throw new AdempiereException(e);
}
finally
{
DB.close(rs, pstmt);
}
}
return list.toArray(new String[list.size()]);
}
}

View File

@ -47,6 +47,7 @@ import org.adempiere.webui.event.WTableModelEvent;
import org.adempiere.webui.event.WTableModelListener;
import org.adempiere.webui.factory.InfoManager;
import org.adempiere.webui.part.ITabOnSelectHandler;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
@ -59,8 +60,10 @@ import org.compiere.model.I_C_Payment;
import org.compiere.model.I_M_InOut;
import org.compiere.model.I_M_Product;
import org.compiere.model.I_S_ResourceAssignment;
import org.compiere.model.MInfoWindow;
import org.compiere.model.MRole;
import org.compiere.model.MTable;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
@ -68,6 +71,7 @@ import org.compiere.util.KeyNamePair;
import org.compiere.util.Msg;
import org.compiere.util.ValueNamePair;
import org.zkoss.zk.au.out.AuEcho;
import org.zkoss.zk.ui.Page;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
@ -279,6 +283,9 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
});
setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "infopanel");
infoWindow = MInfoWindow.get(p_keyColumn.replace("_ID", ""), null);
addEventListener(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, this);
} // InfoPanel
private void init()
@ -368,6 +375,8 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
/** PO Zoom Window */
private int m_PO_Window_ID = -1;
private MInfoWindow infoWindow;
/** Logger */
protected CLogger log = CLogger.getCLogger(getClass());
@ -1164,6 +1173,13 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
else if (event.getName().equals(Events.ON_CHANGE))
{
}
else if (event.getName().equals(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT))
{
if (infoWindow != null)
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Info, infoWindow.getAD_InfoWindow_ID());
else
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Info, 0);
}
//default
else
{
@ -1410,5 +1426,16 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
protected boolean isUseDatabasePaging() {
return m_useDatabasePaging;
}
@Override
public void onPageAttached(Page newpage, Page oldpage) {
super.onPageAttached(newpage, oldpage);
if (newpage != null) {
if (infoWindow != null)
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Info, infoWindow.getAD_InfoWindow_ID());
else
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Info, 0);
}
}
} // Info

View File

@ -80,7 +80,6 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Borderlayout;
import org.zkoss.zul.Cell;
import org.zkoss.zul.Center;
import org.zkoss.zul.North;
import org.zkoss.zul.South;
@ -357,10 +356,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener<Event>
row = new Row();
rows.appendChild(row);
row.appendChild(statusBar);
Cell cell = new Cell();
cell.setColspan(6);
row.appendCellChild(cell);
row.appendCellChild(statusBar, 6);
statusBar.setEastVisibility(false);
statusBar.setWidth("100%");

View File

@ -13,15 +13,23 @@
package org.adempiere.webui.part;
import org.adempiere.webui.apps.ProcessDialog;
import org.adempiere.webui.apps.wf.WFPanel;
import org.adempiere.webui.component.Tab;
import org.adempiere.webui.component.Tabbox;
import org.adempiere.webui.component.Tabpanel;
import org.adempiere.webui.component.Tabpanels;
import org.adempiere.webui.component.Tabs;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.InfoPanel;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.window.WTask;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Anchorlayout;
import org.zkoss.zul.Vlayout;
/**
*
@ -30,6 +38,8 @@ import org.zkoss.zk.ui.event.Events;
*/
public class WindowContainer extends AbstractUIPart
{
public static final String ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT = "onWindowContainerSelectionChanged";
private static final int MAX_TITLE_LENGTH = 30;
private Tabbox tabbox;
@ -128,6 +138,13 @@ public class WindowContainer extends AbstractUIPart
ITabOnSelectHandler handler = (ITabOnSelectHandler) component.getAttribute(ITabOnSelectHandler.ATTRIBUTE_KEY);
handler.onSelect();
}
if (component instanceof Vlayout || component instanceof ADForm || component instanceof ProcessDialog
|| component instanceof InfoPanel || component instanceof Anchorlayout
|| component instanceof WFPanel || component instanceof WTask)
Events.sendEvent(new Event(ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, component));
else
SessionManager.getAppDesktop().updateHelpContext("", 0);
}
});

View File

@ -64,6 +64,10 @@ public final class UserPreference implements Serializable {
public static final String P_MENU_COLLAPSED = "MenuCollapsed";
public static final String DEFAULT_MENU_COLLAPSED = "N";
/** Help Panel Collapsed **/
public static final String P_HELP_COLLAPSED = "HelpCollapsed";
public static final String DEFAULT_HELP_COLLAPSED = "N";
/** Ini Properties */
private static final String[] PROPERTIES = new String[] {
P_LANGUAGE,
@ -73,7 +77,8 @@ public final class UserPreference implements Serializable {
P_WAREHOUSE,
P_AUTO_COMMIT,
P_AUTO_NEW,
P_MENU_COLLAPSED};
P_MENU_COLLAPSED,
P_HELP_COLLAPSED};
/** Ini Property Values */
private static final String[] VALUES = new String[] {
DEFAULT_LANGUAGE,
@ -83,7 +88,8 @@ public final class UserPreference implements Serializable {
DEFAULT_WAREHOUSE,
DEFAULT_AUTO_COMMIT,
DEFAULT_AUTO_NEW,
DEFAULT_MENU_COLLAPSED};
DEFAULT_MENU_COLLAPSED,
DEFAULT_HELP_COLLAPSED};
/** Container for Properties */
private Properties props = new Properties();

View File

@ -35,10 +35,13 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.component.ZkCssHelper;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.panel.WSchedule;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
import org.compiere.model.MAssignmentSlot;
import org.compiere.model.MResourceAssignment;
import org.compiere.model.MRole;
import org.compiere.model.ScheduleUtil;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
@ -156,6 +159,7 @@ public class InfoSchedule extends Window implements EventListener<Event>
log.log(Level.SEVERE, "InfoSchedule", ex);
}
displayCalendar();
addEventListener(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, this);
} // InfoSchedule
/**
@ -456,7 +460,10 @@ public class InfoSchedule extends Window implements EventListener<Event>
else if (event instanceof CalendarsEvent)
doEdit((CalendarsEvent)event);
//
else if (event.getName().equals(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT))
{
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Info, 0);
}
}
private void doEdit(CalendarsEvent event) {
@ -609,6 +616,7 @@ public class InfoSchedule extends Window implements EventListener<Event>
super.onPageAttached(newpage, oldpage);
if (newpage != null) {
displayCalendar();
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Info, 0);
}
}

View File

@ -21,9 +21,11 @@ import java.util.logging.Level;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.OSTask;
import org.compiere.model.MTask;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@ -89,6 +91,8 @@ public class WTask extends Window implements EventListener<Event>
else
info.setContent("Executing locally ...");
addEventListener(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, this);
SessionManager.getAppDesktop().showWindow(this);
Events.echoEvent("executeTask", this, null);
@ -197,6 +201,8 @@ public class WTask extends Window implements EventListener<Event>
{
if (taskThread != null && taskThread.isAlive())
taskThread.interrupt();
else if (e.getName().equals(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT))
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Task, m_task.getAD_Task_ID());
SessionManager.getAppDesktop().closeActiveWindow();
} // actionPerformed

View File

@ -296,7 +296,14 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
padding-top: 4px;
}
.desktop-left-column + .z-west-splt {
.desktop-right-column {
width: 200px;
border: none;
background-color: #E4E4E4;
padding-top: 4px;
}
.desktop-left-column + .z-west-splt, .desktop-right-column + .z-east-splt {
border-top: none;
border-right: 1px solid #c5c5c5;
border-left: 1px solid #c5c5c5;
@ -306,11 +313,15 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
border-right: none;
}
.desktop-left-column .z-west-header {
.desktop-right-column .z-east-body {
border-left: none;
}
.desktop-left-column .z-west-header, .desktop-right-column .z-east-header {
border-top: 1px solid #c5c5c5;
}
.desktop-left-column .z-anchorlayout-body {
.desktop-left-column .z-anchorlayout-body, .desktop-right-column .z-anchorlayout-body {
overflow-x: hidden;
}
@ -1167,3 +1178,8 @@ tbody.z-grid-empty-body td {
-webkit-filter: brightness(-30%);
filter: brightness(-30%);
}
.content
{
font-size: ${fontSizeM};
}