@Override public void setValue(V value) { field.setValue(value); }
@Override public void setValue(T newValue) throws ReadOnlyException { field.setValue(newValue); }
protected void setAttachmentName(String name) { form.getField("name").setValue(name); }
/** * Toggles the visibility of user and password fields. The fields are shown * if "authenticate" checkbox is presssed. Otherwise they are not shown. */ private void updateAuthenticationFields(boolean visible) throws Property.ReadOnlyException, Converter.ConversionException { ((Field<Boolean>) configFieldGroup.getField(MetaConfigModel.AUTHENTICATE)).setValue(visible); configFieldGroup.getField(MetaConfigModel.USER).setVisible(visible); configFieldGroup.getField(MetaConfigModel.PASSWORD).setVisible(visible); if (!visible) { configFieldGroup.getField(MetaConfigModel.USER).setValue(null); configFieldGroup.getField(MetaConfigModel.PASSWORD).setValue(null); } }
/** * Toggles the visibility of user and password fields. The fields are shown * if "authenticate" checkbox is presssed. Otherwise they are not shown. */ private void updateAuthenticationFields(boolean visible) throws ReadOnlyException, ConversionException { getField(MetaConfigModel.AUTHENTICATE).setValue(visible); getField(MetaConfigModel.USER).setVisible(visible); getField(MetaConfigModel.PASSWORD).setVisible(visible); if (!visible) { getField(MetaConfigModel.USER).setValue(null); getField(MetaConfigModel.PASSWORD).setValue(null); } }
public void refreshForm(boolean setCaption, Map<String,Object> valuesMap) { refreshForm(setCaption); List<Property<?>> properties = classInfo.getProperties(); for (Property<?> property : properties) { final com.vaadin.ui.Field field = fieldFactory.createField(property, propertiesForm); propertiesForm.addField(property, field); Object value = valuesMap.get(property.getPropertyId()); //BACKCOMPATIBILITY: this block is necessary for back-compatibility from 2.0 RC1 to 2.0. if (property.getPropertyId().equals("markProcessImportant") ){ if(isValueNullOrEmpty(value)){ value = false; } } field.setValue(value); } } private boolean isValueNullOrEmpty(Object value){
((Field<String>) eachField).setValue((String) property.getValue());
protected void attachField(Object propertyId, Field field) { if (FIELDS_VISIBLE.contains(propertyId)) { if (field.getValue() == null && field.getType() == String.class) { field.setValue("");