Hello, I am glad to be here (this is my first post). I hope I can find help here, and I also hope I will be able to help others.
I am trying to develop an application which requires working with TabPanel component.
In a tab I have a Grid which keeps some records (each record is a Tabel object defined by me). I want to be able to do the following:
When I double-click on a record I want a new tab-item to appear in the tabpanel, tab-item which contains the records contained in the table which have just been double-clicked on.
I have the following:
Code:
grid.addListener(Events.RowDoubleClick,
new Listener<GridEvent<BeanModel>>() {
@Override
public void handleEvent(GridEvent<BeanModel> be) {
String tableName = be.getModel().get("tableName");
TableDetailsGrid tdg = new TableDetailsGrid();
//Here I want to add somehow the new object "TableDetailsGrid" to the big TabPanel
}
});
I thought I need somehow to get the parent by getParent(), I manage to get to the TabPanel and .. let's say .. get it's ID, but I just don't know how to add a new TabItem.
Any suggestion would be very valuable. Thanks!