Dimension size = c != null ? c.getSize() : null;
if (field.getValueType() == DcRepository.ValueTypes._DCOBJECTCOLLECTION) {
DcComboBox combo = ComponentFactory.getComboBox();
c = combo;
combo.addItem(" ");
if (DataManager.getCount(field.getReferenceIdx(), -1, null) > 1000) {
for (DcSimpleValue value : DataManager.getSimpleValues(field.getReferenceIdx(), false))
combo.addItem(value);
} else {
int[] fields;
if (DcModules.get(field.getReferenceIdx()).getType() == DcModule._TYPE_PROPERTY_MODULE) {
fields = new int[] {DcObject._ID, DcProperty._A_NAME, DcProperty._B_ICON};
} else {
fields = new int[] {DcObject._ID, DcModules.get(field.getReferenceIdx()).getDisplayFieldIdx()};
}
List<DcObject> objects = DataManager.get(field.getReferenceIdx(), fields);
for (DcObject dco : objects)
combo.addItem(dco);
}
combo.setUneditable();
} else if (field.getFieldType() == ComponentFactory._FILEFIELD ||
field.getFieldType() == ComponentFactory._FILELAUNCHFIELD) {
c = ComponentFactory.getShortTextField(255);
} else {
c = ComponentFactory.getComponent(field.getModule(), field.getReferenceIdx(), field.getIndex(),