* Remove 'save parent first' feature that doesn't work as expected

* Detail tab don't retrieve all when parent is empty or new
This commit is contained in:
Heng Sin Low 2007-02-12 23:38:22 +00:00
parent 3a5a379385
commit c133d6dd00
2 changed files with 11 additions and 6 deletions

View File

@ -454,7 +454,9 @@ public class GridField
if (m_vo.DefaultValue.startsWith("@SQL=")) if (m_vo.DefaultValue.startsWith("@SQL="))
{ {
String sql = m_vo.DefaultValue.substring(5); // w/o tag String sql = m_vo.DefaultValue.substring(5); // w/o tag
sql = Env.parseContext(m_vo.ctx, m_vo.WindowNo, sql, false, true); // replace variables //sql = Env.parseContext(m_vo.ctx, m_vo.WindowNo, sql, false, true); // replace variables
//hengsin, capture unparseable error to avoid subsequent sql exception
sql = Env.parseContext(m_vo.ctx, m_vo.WindowNo, sql, false, false); // replace variables
if (sql.equals("")) if (sql.equals(""))
{ {
log.log(Level.WARNING, "(" + m_vo.ColumnName + ") - Default SQL variable parse failed: " log.log(Level.WARNING, "(" + m_vo.ColumnName + ") - Default SQL variable parse failed: "

View File

@ -128,7 +128,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
/** Logger */ /** Logger */
protected CLogger log = CLogger.getCLogger(getClass()); protected CLogger log = CLogger.getCLogger(getClass());
private boolean m_parentNeedSave = false; //private boolean m_parentNeedSave = false;
/************************************************************************** /**************************************************************************
@ -518,7 +518,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
// Detail Query // Detail Query
if (isDetail()) if (isDetail())
{ {
m_parentNeedSave = false; //m_parentNeedSave = false;
String lc = getLinkColumnName(); String lc = getLinkColumnName();
if (lc.equals("")) if (lc.equals(""))
log.severe ("No link column"); log.severe ("No link column");
@ -534,8 +534,10 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
{ {
//log.severe ("No value for link column " + lc); //log.severe ("No value for link column " + lc);
//parent is new, can't retrieve detail //parent is new, can't retrieve detail
m_parentNeedSave = true; //m_parentNeedSave = true;
return; if (where.length() != 0)
where.append(" AND ");
where.append(lc).append(" is null ");
} }
else else
{ {
@ -2426,13 +2428,14 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
return m_mTable.getValueAt(row, col); return m_mTable.getValueAt(row, col);
} // getValue } // getValue
/*
public boolean isNeedToSaveParent() public boolean isNeedToSaveParent()
{ {
if (isDetail()) if (isDetail())
return m_parentNeedSave; return m_parentNeedSave;
else else
return false; return false;
} }*/
/** /**
* toString * toString