Directory

← Back

TextFieldMultiline Add-on

TextFieldMultiline

Author

Rating

Popularity

<100

A vaadin textfield that turns into a vaadin textarea to give the option to give a multiline string. Each line will be an entry in the value (List).

Sample code

package org.vaadin.addons.demo;

import org.vaadin.addons.TextFieldMulitline;

import java.awt.TextField;

import javax.servlet.annotation.WebServlet;

import com.vaadin.annotations.Theme;
import com.vaadin.annotations.Title;
import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;

@Theme("demo")
@Title("TextFieldMultiselect Add-on Demo")
@SuppressWarnings("serial")
public class DemoUI extends UI
{

    @WebServlet(value = "/*", asyncSupported = true)
    @VaadinServletConfiguration(productionMode = false, ui = DemoUI.class, widgetset = "org.vaadin.addons.demo.DemoWidgetSet")
    public static class Servlet extends VaadinServlet {
    }

    @Override
    protected void init(VaadinRequest request) {

        // Initialize our new UI component
        final TextFieldMulitline component = new TextFieldMulitline();
        component.setCaption("Caption");
        component.setInputPrompt("Enter multiline here");

        // Show it in the middle of the screen
        final VerticalLayout layout = new VerticalLayout();
        layout.setStyleName("demoContentLayout");
        layout.setSizeFull();
        layout.addComponent(component);
        layout.setComponentAlignment(component, Alignment.MIDDLE_CENTER);
        setContent(layout);

    }

}

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Released
2017-12-18
Maturity
BETA
License
MIT License

Compatibility

Framework
Vaadin 7.0+
Vaadin 8.0+ in 2.0
Vaadin 7.6+ in 0.0.10
Browser
Internet Explorer
Internet Explorer
Internet Explorer
Firefox
Opera
Safari
Google Chrome
Internet Explorer
iOS Browser
Internet Explorer
Internet Explorer

TextFieldMultiline Add-on - Vaadin Add-on Directory

TextFieldMultiline TextFieldMultiline Add-on - Vaadin Add-on Directory
A vaadin textfield that turns into a vaadin textarea to give the option to give a multiline string. Each line will be an entry in the value (List).
Online