Reputation: 141
How can I display long text using Vaadin? I tried it with Label and method setText()
, but unfortunately it displays only first ~250 characters.
Upvotes: 2
Views: 732
Reputation: 4686
The Label
component in Vaadin 14 represents the HTML <label>
, which according to MDN "represents a caption for an item in a user interface". As a caption component, it is not really suitable for long texts. It can be a little confusing if you are from the Vaadin 7/8 world where Label
was a generic component for any text.
In Vaadin 14, I suggest using the Paragraph
component. I represents the <p>
tag in HTML.
This should work
layout.add(new Paragraph("Hello from a very long text..."));
Upvotes: 4