@Override
public Field createField(Item item, Object propertyId, Component uiContext) {
Field field = super.createField(item, propertyId, uiContext);
if ("process".equalsIgnoreCase(propertyId.toString())) {
NativeSelect select = new NativeSelect();
Collection<ProcessDefinitionConfig> processes = ctx.getProcessDefinitionDAO().getActiveConfigurations();
BeanItemContainer<ProcessDefinitionConfig> ds = new BeanItemContainer<ProcessDefinitionConfig>(ProcessDefinitionConfig.class);
ds.addAll(processes);
select.setContainerDataSource(ds);
select.setItemCaptionPropertyId("description");
select.setItemCaptionMode(Select.ITEM_CAPTION_MODE_PROPERTY);
select.setNullSelectionAllowed(false);
select.setRequired(true);
select.setPropertyDataSource(item.getItemProperty(propertyId));
field = select;
}
else if ("name".equalsIgnoreCase(propertyId.toString())) {
TextField text = new TextField();
text.setNullRepresentation("");