Peer review IDEMPIERE-370 Implement link from process ending message to next records

This commit is contained in:
Carlos Ruiz 2012-08-23 19:12:30 -05:00
parent e26b6e6ea9
commit 90b791b1e3
4 changed files with 16 additions and 20 deletions

View File

@ -68,10 +68,6 @@ public class ProcessInfo implements Serializable
this (Title, AD_Process_ID, 0, 0); this (Title, AD_Process_ID, 0, 0);
} // ProcessInfo } // ProcessInfo
/** Serialization Info **/
static final long serialVersionUID = -1993220053515488725L;
/** Title of the Process/Report */ /** Title of the Process/Report */
private String m_Title; private String m_Title;
/** Process ID */ /** Process ID */

View File

@ -31,7 +31,7 @@ public class ProcessInfoLog implements Serializable
/** /**
* *
*/ */
private static final long serialVersionUID = -4064380205358897097L; private static final long serialVersionUID = 2790364724540395200L;
/** /**
* Create Process Info Log. * Create Process Info Log.
@ -47,8 +47,8 @@ public class ProcessInfoLog implements Serializable
setP_Date (P_Date); setP_Date (P_Date);
setP_Number (P_Number); setP_Number (P_Number);
setP_Msg (P_Msg); setP_Msg (P_Msg);
setAd_Table_Id(AD_Table_ID); setAD_Table_ID(AD_Table_ID);
setRecord_Id(Record_ID); setRecord_ID(Record_ID);
} // ProcessInfoLog } // ProcessInfoLog
@ -92,19 +92,19 @@ public class ProcessInfoLog implements Serializable
private int m_AD_Table_ID; private int m_AD_Table_ID;
private int m_Record_ID; private int m_Record_ID;
public int getAd_Table_Id() { public int getAD_Table_ID() {
return m_AD_Table_ID; return m_AD_Table_ID;
} }
public void setAd_Table_Id(int tableId) { public void setAD_Table_ID(int tableId) {
this.m_AD_Table_ID = tableId; this.m_AD_Table_ID = tableId;
} }
public int getRecord_Id() { public int getRecord_ID() {
return m_Record_ID; return m_Record_ID;
} }
public void setRecord_Id(int recordId) { public void setRecord_ID(int recordId) {
this.m_Record_ID = recordId; this.m_Record_ID = recordId;
} }
/** /**

View File

@ -115,7 +115,7 @@ public class ProcessInfoUtil
public static void setLogFromDB (ProcessInfo pi) public static void setLogFromDB (ProcessInfo pi)
{ {
// s_log.fine("setLogFromDB - AD_PInstance_ID=" + pi.getAD_PInstance_ID()); // s_log.fine("setLogFromDB - AD_PInstance_ID=" + pi.getAD_PInstance_ID());
String sql = "SELECT Log_ID, P_ID, P_Date, P_Number, P_Msg, AD_Table_Id,Record_Id " String sql = "SELECT Log_ID, P_ID, P_Date, P_Number, P_Msg, AD_Table_ID,Record_ID "
+ "FROM AD_PInstance_Log " + "FROM AD_PInstance_Log "
+ "WHERE AD_PInstance_ID=? " + "WHERE AD_PInstance_ID=? "
+ "ORDER BY Log_ID"; + "ORDER BY Log_ID";
@ -158,7 +158,7 @@ public class ProcessInfoUtil
for (int i = 0; i < logs.length; i++) for (int i = 0; i < logs.length; i++)
{ {
StringBuffer sql = new StringBuffer ("INSERT INTO AD_PInstance_Log " StringBuffer sql = new StringBuffer ("INSERT INTO AD_PInstance_Log "
+ "(AD_PInstance_ID, Log_ID, P_Date, P_ID, P_Number, P_Msg, AD_Table_Id,Record_ID)" + "(AD_PInstance_ID, Log_ID, P_Date, P_ID, P_Number, P_Msg, AD_Table_ID,Record_ID)"
+ " VALUES ("); + " VALUES (");
sql.append(pi.getAD_PInstance_ID()).append(",") sql.append(pi.getAD_PInstance_ID()).append(",")
.append(logs[i].getLog_ID()).append(","); .append(logs[i].getLog_ID()).append(",");
@ -178,14 +178,14 @@ public class ProcessInfoUtil
sql.append("NULL,"); sql.append("NULL,");
else else
sql.append(DB.TO_STRING(logs[i].getP_Msg(),2000)).append(","); sql.append(DB.TO_STRING(logs[i].getP_Msg(),2000)).append(",");
if (logs[i].getAd_Table_Id() == 0) if (logs[i].getAD_Table_ID() == 0)
sql.append("NULL,"); sql.append("NULL,");
else else
sql.append(logs[i].getAd_Table_Id()).append(","); sql.append(logs[i].getAD_Table_ID()).append(",");
if (logs[i].getRecord_Id() == 0) if (logs[i].getRecord_ID() == 0)
sql.append("NULL)"); sql.append("NULL)");
else else
sql.append(logs[i].getRecord_Id()).append(")"); sql.append(logs[i].getRecord_ID()).append(")");
// //
DB.executeUpdate(sql.toString(), null); DB.executeUpdate(sql.toString(), null);
} }

View File

@ -509,9 +509,9 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
recordLink = new A(); recordLink = new A();
recordLink.setLabel(log.getP_Msg()); recordLink.setLabel(log.getP_Msg());
if (log.getAd_Table_Id() > 0 && log.getRecord_Id()> 0) { if (log.getAD_Table_ID() > 0 && log.getRecord_ID()> 0) {
recordLink.setAttribute("Record_ID", String.valueOf(log.getRecord_Id())); recordLink.setAttribute("Record_ID", String.valueOf(log.getRecord_ID()));
recordLink.setAttribute("AD_Table_ID", String.valueOf(log.getAd_Table_Id())); recordLink.setAttribute("AD_Table_ID", String.valueOf(log.getAD_Table_ID()));
recordLink.addEventListener(Events.ON_CLICK, this); recordLink.addEventListener(Events.ON_CLICK, this);
} }