0
votes

Is it possible to create panel with dynamic added tabs in GWT using TabPanel or TabLayoutPanel.

My requirements:

First tab is not closeable and has a celltable. When I select row in the celltable, new tab is created. Newly created tab can be closed. My question:

How to create this architecture in GWT using MVP style and UiBinder?

1
have a look here gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/…, java.lang.String), you can use this method to add tabs dynamically to your TabLayoutPanel othe approach is to clean panel with content of your tabuser902383
Thank you, but clean panel content is not really suitable for me. I must create new tabs.olgacosta

1 Answers

1
votes

Why not? Even if you get some problem in GWT, you always can dive into level below to javascript and make exactly what you need.

Any panel can be dinamically changed. If it is layout panel then you can forceLayout() it at any moment. You can add() or insert() new items to panel and use different selfmade widgets for tabs (you have a lot of possibilities how to add or insert: add(Widget child, Widget tab) or add(Widget child, SafeHtml html)).

Here is an example how it made with ExtGWT, logic is identical but you will have to made widgets for your tabs (that can be closed and not).