1003404 IDEMPIERE-1483 Performance problems (Time Out) when creating new records

This commit is contained in:
Heng Sin Low 2013-10-29 17:55:26 +08:00
parent d7f80a1472
commit 1a113b9cb5
2 changed files with 27 additions and 12 deletions

View File

@ -2289,17 +2289,6 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
// Info
StringBuilder info = new StringBuilder(getTableName());
/* get UUID */
if (!e.isInserting() && e.getCurrentRow() >= 0 && e.getCurrentRow() < e.getTotalRows())
{
PO po = m_mTable.getPO(e.getCurrentRow());
if (po != null) {
String uuidcol = po.getUUIDColumnName();
String uuid = po.get_ValueAsString(uuidcol);
info.append("\n ").append(uuidcol).append("=").append(uuid);
}
}
// We have a key column
if (m_keyColumnName != null && m_keyColumnName.length() > 0)
{

View File

@ -33,6 +33,8 @@ import org.adempiere.webui.component.Listbox;
import org.adempiere.webui.component.SimpleListModel;
import org.adempiere.webui.component.Window;
import org.compiere.model.DataStatusEvent;
import org.compiere.model.GridTab;
import org.compiere.model.GridTable;
import org.compiere.model.MChangeLog;
import org.compiere.model.MColumn;
import org.compiere.model.MLookup;
@ -40,12 +42,14 @@ import org.compiere.model.MLookupFactory;
import org.compiere.model.MRole;
import org.compiere.model.MTable;
import org.compiere.model.MUser;
import org.compiere.model.PO;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.NamePair;
import org.compiere.util.Util;
import org.zkoss.zhtml.Pre;
import org.zkoss.zhtml.Text;
import org.zkoss.zk.ui.event.Event;
@ -211,7 +215,29 @@ public class WRecordInfo extends Window implements EventListener<Event>
.append(" - ").append(m_dateTimeFormat.format(dse.Updated)).append("\n");
}
if (dse.Info != null && dse.Info.length() > 0)
m_info.append("\n (").append(dse.Info).append(")");
m_info.append("\n ").append(dse.Info).append("");
//get uuid
GridTable gridTable = null;
if (dse.getSource() instanceof GridTab)
{
GridTab gridTab = (GridTab) dse.getSource();
gridTable = gridTab.getTableModel();
}
else if (dse.getSource() instanceof GridTable)
{
gridTable = (GridTable) dse.getSource();
}
if (gridTable != null && dse.getCurrentRow() >= 0 && dse.getCurrentRow() < gridTable.getRowCount())
{
PO po = gridTable.getPO(dse.getCurrentRow());
if (po != null) {
String uuidcol = po.getUUIDColumnName();
String uuid = po.get_ValueAsString(uuidcol);
if (!Util.isEmpty(uuid))
m_info.append("\n ").append(uuidcol).append("=").append(uuid);
}
}
// Title
if (dse.AD_Table_ID != 0)