private static void switchCaption(AbstractField field, MessageSourceAccessor messageSourceAccessor) { String newCaption = getTranslatedCaption(field.getCaption(),messageSourceAccessor); if (newCaption != null) { field.setCaption(newCaption); } } private static void switchCaption(TabSheet tabSheet, MessageSourceAccessor messageSourceAccessor)
/** * Binds the given component to the given bean property.<p> * * @param field the component * @param property the bean property */ void bindField(AbstractField<?> field, String property) { m_group.bind(field, property); field.setCaption(CmsVaadinUtils.getMessageText("label." + property)); field.setDescription(CmsVaadinUtils.getMessageText("label." + property + ".help")); }
private void setFieldMetaData(OptionKey<?> key, AbstractField<?> uiField) { uiField.setCaption(translate.from(key.getKey())); uiField.setDescription(translate.from(key.getDescriptionKey())); // Optional<String> optionKeyName = Optional.of(((Enum) key.getKey()).name()); // uiField.setId(ID.getId(optionKeyName, this, uiField)); // log.debug("Component id for '{}' set to: '{}'", uiField.getCaption(), uiField.getId()); }
Object value = option.get(key); AbstractField uiField = dataTypeToUI.componentFor(value); uiField.setCaption(translate.from(key.getKey())); uiField.setDescription(translate.from(key.getDescriptionKey())); Optional<String> optionKeyName = Optional.of(((Enum) key.getKey()).name());
ret.setReadThrough(true); ret.setPropertyDataSource(property); ret.setCaption(property.getLabel()); ret.setRequired(property.isRequired()); if (property.isRequired())
ret.setBuffered(false); ret.setPropertyDataSource(property); ret.setCaption(property.getLabel()); ret.setRequired(property.isRequired()); if (property.isRequired())
ret.setCaption(property.getLabel()); ret.setRequired(property.isRequired()); if (property.isRequired())
ret.setReadThrough(true); ret.setPropertyDataSource(property); ret.setCaption(property.getLabel()); ret.setRequired(property.isRequired()); if (property.isRequired())