Bind SQLContainer item to Form/BeanItem

Hi,

I’m very new to Vaadin framework so kindly excuse my noob question.

I’ve read the tutorial on binding BeanIteam or PropertysetItem to Form component. Is is possible to bind directly from SQLContainer? Something like below :

JDBCConnectionPool connectionPool = new SimpleJDBCConnectionPool(…);
TableQuery tq = new TableQuery(“my_table”, connectionPool, new OracleGenerator());
SQLContainer container = new SQLContainer(tq);
BeanItem item = new BeanItem(tq);
form.setItemDataSource(item);

I tried this to no avail.

Thanks,

Taqu.

No. BeanItem can’t be used with TableQuery. Instead SQLContainer has its own item type (RowItem). You can bind the item from SQLContainer to a Form.