[ 2691102 ] Handle AD_Tab WhereClause context variable parse failure

This commit is contained in:
Heng Sin Low 2009-03-18 08:08:14 +00:00
parent 7b61d015e2
commit 6ba368f7ef
1 changed files with 12 additions and 1 deletions

View File

@ -296,7 +296,18 @@ public class GridTable extends AbstractTableModel
if (m_whereClause.indexOf('@') == -1) if (m_whereClause.indexOf('@') == -1)
where.append(m_whereClause); where.append(m_whereClause);
else // replace variables else // replace variables
where.append(Env.parseContext(m_ctx, m_WindowNo, m_whereClause, false)); {
String context = Env.parseContext(m_ctx, m_WindowNo, m_whereClause, false);
if(context != null && context.length() > 0)
{
where.append(context);
}
else
{
log.log(Level.WARNING, "Failed to parse where clause. whereClause="+m_whereClause);
where.append(" 1 = 2 ");
}
}
} }
if (m_onlyCurrentRows && m_TabNo == 0) if (m_onlyCurrentRows && m_TabNo == 0)
{ {