Help needed for the basic initialization of JPAContainer

Hello all!

Our school project’s purpose is to create a simple Task lister app. I’m struggling with the initialization of JPAContainer (connects to h2 database fine, just need the basic instructions on building the container with JPAContainer, and calling the rows into the table.)

Any reply would be much appreciated, regarding the JPAContainer
or any other idea (based on screencap).

Currently the working buttons are “Print the 8”, “About App” and “Exit App”

Here’s the layout:
DateField / TextField / ComboBox setup,

I need the general help how to mark up JPAContainer into my existing table,
and how to bind the rows to database data. The aim here is to have a task list of 8 tasks.
I’d like the combobox and deadline to be updatable from the view above.

//JPACONTAINER (persistence unit)
    public static final String PERSISTENCE_UNIT = "next8.app"; //Bound to h2database, connects.


//TABLES
            Table tasks = new Table("", tasklists);   //TaskList
                        tasks.addContainerProperty("Deadline", DateField.class, null);
                        tasks.addContainerProperty("Task Name", TextField.class, null);
                        tasks.addContainerProperty("Status", ComboBox.class, null);
                 layout.addComponent(tasks);
            Table table2 = new Table();               //Add new task

//This.. I don't manage at all.
JPAContainer<Tasklist> tasklists =
     JPAContainerFactory.make(Tasklist.class, "examples");

/** 
DateFields are called d1-d8.         (Add new field is dnew)
TextFields are called field1-field8  (Add new field is fieldnew)
ComboBoxes are called combo1-combo8  (Add new combo is combonew)
ComboBox choices:
                        ComboBox comboX = new ComboBox();
                            comboX.setInvalidAllowed(false);
                            comboX.setNullSelectionAllowed(false);
                            comboX.addItem("Not Done");
                            comboX.addItem("In Progress");
                            comboX.addItem("Done");
                            comboX.addItem("Postponed");
**/

//Configure TASKS layout
                        tasks.addItem(new Object {d1, field1, combo1}, new Integer(1));
                        tasks.addItem(new Object {d2, field2, combo2}, new Integer(2));
                        tasks.addItem(new Object {d3, field3, combo3}, new Integer(3));
                        tasks.addItem(new Object {d4, field4, combo4}, new Integer(4));
                        tasks.addItem(new Object {d5, field5, combo5}, new Integer(5));
                        tasks.addItem(new Object {d6, field6, combo6}, new Integer(6));
                        tasks.addItem(new Object {d7, field7, combo7}, new Integer(7));
                        tasks.addItem(new Object {d8, field8, combo8}, new Integer(8));

Hi, Niki!

Perhaps this tutorial might be of use:
https://vaadin.com/download/jpacontainer-tutorial/

-Vesa