IDEMPIERE-3631: InfoWindow : Reference Date+Time only displays Date in grid

java.lang.IndexOutOfBoundsException
This commit is contained in:
hieplq 2018-07-14 22:34:31 +07:00
parent 72e7e21d28
commit 6e62f45845
1 changed files with 5 additions and 1 deletions

View File

@ -294,7 +294,11 @@ public class WListItemRenderer implements ListitemRenderer<Object>, EventListene
}
else if (field instanceof Timestamp)
{
int refId = m_tableColumns.get(columnIndex).getAD_Reference_ID();
int refId = 0;
if (m_tableColumns != null && columnIndex < m_tableColumns.size()) {
refId = m_tableColumns.get(columnIndex).getAD_Reference_ID();
}
if (refId == 0)
refId = DisplayType.Date;
SimpleDateFormat dateFormat = DisplayType.getDateFormat(refId, AEnv.getLanguage(Env.getCtx()));