use of com.servoy.j2db.server.ngclient.ColumnBasedValueList in project servoy-client by Servoy.
the class ValueListTypeSabloValue method initializeValuelistAndFormat.
private void initializeValuelistAndFormat() {
INGApplication application = dataAdapterListToUse.getApplication();
ValueList valuelistPersist = getValuelistPersist(valuelistIdentifier, application);
format = getComponentFormat(vlPD, dataAdapterListToUse, getConfig(), dataproviderID, webObjectContext);
if (valuelistPersist != null) {
valueList = getRealValueList(application, valuelistPersist, format, dataproviderID);
if (customValueListDataSet != null && valuelistPersist.getValueListType() == IValueListConstants.CUSTOM_VALUES) {
valueList = ValueListFactory.fillRealValueList(application, valuelistPersist, IValueListConstants.CUSTOM_VALUES, ((CustomValueList) valueList).getFormat(), ((CustomValueList) valueList).getValueType(), customValueListDataSet);
}
} else {
if ("autoVL".equals(getConfig().getDefaultValue())) {
ITable table = getTableForDp();
if (dataproviderID != null && table != null && table.getColumnType(dataproviderID) != 0) {
valueList = new ColumnBasedValueList(application, table.getServerName(), table.getName(), dataproviderID);
} else {
// not supported empty valuelist (based on relations) just return an empty valuelist
valueList = new CustomValueList(application, null, "", false, IColumnTypes.TEXT, null);
}
}
}
}
Aggregations