use of com.vaadin.flow.component.textfield.TextArea in project flow-components by vaadin.
the class TextAreaTest method autoselectPropertyValue.
@Test
public void autoselectPropertyValue() {
TextArea textArea = new TextArea();
assertAutoselectPropertyValueEquals(textArea, true);
assertAutoselectPropertyValueEquals(textArea, false);
}
use of com.vaadin.flow.component.textfield.TextArea in project flow-components by vaadin.
the class TextAreaTest method initialValuePropertyValue.
@Test
public void initialValuePropertyValue() {
TextArea textArea = new TextArea();
assertEquals(textArea.getEmptyValue(), textArea.getElement().getProperty("value"));
}
use of com.vaadin.flow.component.textfield.TextArea in project microstream by microstream-one.
the class InternalErrorView method beforeEnter.
@Override
public void beforeEnter(final BeforeEnterEvent event) {
final H3 header = new H3(getTranslation("INTERNAL_ERROR_TITLE"));
header.addClassName(ClassNames.ERROR);
this.add(header);
final VaadinSession session = event.getUI().getSession();
final SessionData sessionData = session.getAttribute(SessionData.class);
if (sessionData != null) {
this.add(new Label(getTranslation("INTERNAL_ERROR_HINT", sessionData.baseUrl())));
}
final Throwable t = (Throwable) session.getAttribute(ApplicationErrorHandler.THROWABLE_ATTRIBUTE);
if (t != null) {
this.add(new Hr());
final StringWriter stringWriter = new StringWriter();
try (final PrintWriter writer = new PrintWriter(stringWriter)) {
t.printStackTrace(writer);
}
final TextArea stackTrace = new TextArea();
stackTrace.setValue(stringWriter.toString());
stackTrace.setReadOnly(true);
stackTrace.setWidth("100%");
final Details details = new Details(getTranslation("DETAILS"), stackTrace);
details.setOpened(false);
this.add(details);
this.setHorizontalComponentAlignment(Alignment.STRETCH, details);
this.setFlexGrow(1, details);
}
}
use of com.vaadin.flow.component.textfield.TextArea in project linkki by linkki-framework.
the class BindSuffixAspectDefinitionTest method testSuffixType_Static.
@Test
public void testSuffixType_Static() {
TextArea area = new TextArea();
callSuffixAspectDefinition(area, "€", SuffixType.STATIC);
String suffixResult = area.getSuffixComponent().getElement().getText();
assertThat(suffixResult, is("€"));
}
use of com.vaadin.flow.component.textfield.TextArea in project linkki by linkki-framework.
the class BindSuffixAspectDefinitionTest method testSuffixType_AutoFilledSuffix.
@Test
public void testSuffixType_AutoFilledSuffix() {
TextArea area = new TextArea();
callSuffixAspectDefinition(area, "€", SuffixType.AUTO);
String suffixResult = area.getSuffixComponent().getElement().getText();
assertThat(suffixResult, is("€"));
}
Aggregations