* 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:
parent
3a5a379385
commit
c133d6dd00
|
@ -454,7 +454,9 @@ public class GridField
|
|||
if (m_vo.DefaultValue.startsWith("@SQL="))
|
||||
{
|
||||
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(""))
|
||||
{
|
||||
log.log(Level.WARNING, "(" + m_vo.ColumnName + ") - Default SQL variable parse failed: "
|
||||
|
|
|
@ -128,7 +128,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
/** Logger */
|
||||
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
|
||||
if (isDetail())
|
||||
{
|
||||
m_parentNeedSave = false;
|
||||
//m_parentNeedSave = false;
|
||||
String lc = getLinkColumnName();
|
||||
if (lc.equals(""))
|
||||
log.severe ("No link column");
|
||||
|
@ -534,8 +534,10 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
{
|
||||
//log.severe ("No value for link column " + lc);
|
||||
//parent is new, can't retrieve detail
|
||||
m_parentNeedSave = true;
|
||||
return;
|
||||
//m_parentNeedSave = true;
|
||||
if (where.length() != 0)
|
||||
where.append(" AND ");
|
||||
where.append(lc).append(" is null ");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2426,13 +2428,14 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
return m_mTable.getValueAt(row, col);
|
||||
} // getValue
|
||||
|
||||
/*
|
||||
public boolean isNeedToSaveParent()
|
||||
{
|
||||
if (isDetail())
|
||||
return m_parentNeedSave;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* toString
|
||||
|
|
Loading…
Reference in New Issue