if (value==null && column!=null)
value = column;
// Find Record Value
if (value instanceof ColumnExpr)
{
ColumnExpr column = ((ColumnExpr)value);
if (rec!=null)
{ // Find column by object first
int index = rec.getFieldIndex(column);
if (index<0)
{ // Column not found. Trying name
log.debug("Column object '" + column.getName() + "' not found. Trying name.");
index = rec.getFieldIndex( column.getName());
if (index<0)
{ // Column not found
log.error("Column '" + column.getName() + "' not found in record.");
return null;
}
}
// Get value from record
return rec.getValue(index);
}
else
{ // Check if Columns specifies a bean property
Object bean = getBean();
if (bean!=null)
{ // Property Name
String prop = column.getBeanPropertyName();
return getBeanProperty(bean, prop);
}
}
// Cannot find data source (record or bean)
// log.warn("No record supplied for column value");