From Item to Container

Hello
I have 2 tables in my application. when i select an item (row) from the first table i need to set some properties from this item as a container to the second table.

how can i wrap an item to a container for a table?

thanks
isa

What are you trying to do here exactly?
Making a container out of an item is not possible and also doesn’t really make sense.
What you can do on the other hand is adding a new item to a container or a table (which also basically adds it to the container).

Example: Table tableA = new Table(); Table tableB = new Table(); IndexedContainer containerA = new IndexedContainer(); IndexedContainer containerB = new IndexedContainer(); tableA.setContainerDataSource(containerA); tableB.setContainerDataSource(containerB); populatecontainerAwithData();//method in which containerA gets populated with data tableA.addItemClickListener(new ....{ @Override public void itemClick(ItemClickEvent event){ Item itemA = containerA.getItem(event.getItemID()) Object itemidb = containerB.addItem(); Item itemB = containerB.getItem(itemidb); itemB.getItemProperty("SomeProperty").setValue(itemA.getItemProperty("AlsoSomeProperty").getValue()); } })

omg… it can be so easy…
thank you so much!
isa