use of org.eclipse.sirius.components.forms.elements.TextareaElementProps in project sirius-components by eclipse-sirius.
the class TextareaComponent method render.
@Override
public Element render() {
VariableManager variableManager = this.props.getVariableManager();
TextareaDescription textareaDescription = this.props.getTextareaDescription();
String id = textareaDescription.getIdProvider().apply(variableManager);
String label = textareaDescription.getLabelProvider().apply(variableManager);
String value = textareaDescription.getValueProvider().apply(variableManager);
Function<String, IStatus> specializedHandler = newValue -> {
return textareaDescription.getNewValueHandler().apply(variableManager, newValue);
};
List<Element> children = List.of(new Element(DiagnosticComponent.class, new DiagnosticComponentProps(textareaDescription, variableManager)));
// @formatter:off
TextareaElementProps textareaElementProps = TextareaElementProps.newTextareaElementProps(id).label(label).value(value).newValueHandler(specializedHandler).children(children).build();
return new Element(TextareaElementProps.TYPE, textareaElementProps);
// @formatter:on
}
Aggregations