[ 1892335 ] Define custom info class at ad_column or ad_field

This commit is contained in:
Heng Sin Low 2008-02-13 09:17:24 +00:00
parent 55174da98e
commit ac741f0218
4 changed files with 24 additions and 0 deletions

View File

@ -53,6 +53,8 @@ public class GridFieldVO implements Serializable
return sql;
} // getSQL
private String InfoFactoryClass = null;
/**
* Create Field Value Object
* @param ctx context
@ -163,6 +165,9 @@ public class GridFieldVO implements Serializable
// Collapse Default State
else if (columnName.equalsIgnoreCase("IsCollapsedByDefault"))
vo.IsCollapsedByDefault = "Y".equals(rs.getString(i));
//Info Factory class
else if (columnName.equalsIgnoreCase("InfoFactoryClass"))
vo.InfoFactoryClass = rs.getString(i);
}
if (vo.Header == null)
vo.Header = vo.ColumnName;
@ -539,6 +544,7 @@ public class GridFieldVO implements Serializable
lookupInfo = MLookupFactory.getLookupInfo (ctx, WindowNo, AD_Column_ID, displayType,
Env.getLanguage(ctx), ColumnName, AD_Reference_Value_ID,
IsParent, ValidationCode);
lookupInfo.InfoFactoryClass = this.InfoFactoryClass;
}
catch (Exception e) // Cannot create Lookup
{

View File

@ -492,4 +492,13 @@ public abstract class Lookup extends AbstractListModel
return m_loaded;
}
/**
* Get custom info factory class
* @return info factory class name
*/
public String getInfoFactoryClass()
{
return "";
}
} // Lookup

View File

@ -631,6 +631,13 @@ public final class MLookup extends Lookup implements Serializable
return false;
}
@Override
public String getInfoFactoryClass() {
return m_info.InfoFactoryClass != null ? m_info.InfoFactoryClass : "";
}
/**************************************************************************
* MLookup Loader
*/

View File

@ -183,6 +183,8 @@ public class MLookupInfo implements Serializable, Cloneable
public String parsedValidationCode = "";
public String InfoFactoryClass = null;
/**
* String representation
* @return info