@@ -0,0 +1,1397 @@
+package org.vaadin.presentation;%0A%0Aimport com.vaadin.cdi.CDIUI;%0Aimport com.vaadin.server.VaadinRequest;%0Aimport com.vaadin.ui.Button;%0Aimport com.vaadin.ui.TextField;%0Aimport com.vaadin.ui.UI;%0Aimport javax.inject.Inject;%0Aimport org.vaadin.BookService;%0Aimport org.vaadin.entities.Book;%0Aimport org.vaadin.maddon.fields.MTable;%0Aimport org.vaadin.maddon.label.Header;%0Aimport org.vaadin.maddon.layouts.MVerticalLayout;%0A%0A@CDIUI%0Apublic class BookUI extends UI %7B%0A%0A    @Inject%0A    private BookService bookService;%0A%0A    MTable%3CBook%3E bookTable = new MTable().withColumnHeaders(%22ID%22, %22Title%22);%0A%0A    Header header = new Header(%0A            %22This is a simple TomEE + Vaadin CDI example project%22);%0A%0A    @Override%0A    public void init(VaadinRequest request) %7B%0A%0A        listBooks();%0A%0A        final TextField titleField = new TextField();%0A%0A        Button addButton = new Button(%22Add book%22, new Button.ClickListener() %7B%0A%0A            @Override%0A            public void buttonClick(Button.ClickEvent event) %7B%0A                Book b = new Book();%0A                b.setBookTitle(titleField.getValue());%0A                bookService.addBook(b);%0A                titleField.setValue(%22%22);%0A                listBooks();%0A            %7D%0A        %7D);%0A%0A        setContent(new MVerticalLayout(header, bookTable, titleField, addButton));%0A    %7D%0A%0A    private void listBooks() %7B%0A        bookTable.setBeans(bookService.getAllBooks());%0A    %7D%0A%0A%7D%0A

Add simple BookUI written with Vaadin