IDEMPIERE-1763 Table based layout - respect fixed column width even when data is null.

This commit is contained in:
Heng Sin Low 2014-01-23 22:15:59 +08:00
parent 157b2f1534
commit b7cacdac2e
1 changed files with 11 additions and 3 deletions

View File

@ -330,9 +330,17 @@ public class TableElement extends PrintElement
Serializable dataItem = m_data.getRowData().get(dataCol);
if (dataItem == null)
{
dimensions.set(dataCol, new Dimension2DImpl());
continue;
}
//ensure fixed column width respected even when data is null
if (m_columnMaxWidth[col] != 0 && m_columnMaxWidth[col] != -1 && m_fixedWidth[col])
{
dataItem = " ";
}
else
{
dimensions.set(dataCol, new Dimension2DImpl());
continue;
}
}
String string = dataItem.toString();
if (string.length() == 0)
{