alexanoid
alexanoid

Reputation: 25770

Vaadin 7 add buttons into Accordion com.vaadin.ui.TabSheet.Tab caption

Is it possible to add a buttons in Vaadin 7 to Accordion com.vaadin.ui.TabSheet.Tab caption ?

Right now I can only add a String into Tab caption.

This is my current screen:

enter image description here

I need to add the same Edit/Remove icons(as I have for Live Chat and WMA) near the General and Julia Group tab captions.

Upvotes: 0

Views: 441

Answers (1)

Henri Kerola
Henri Kerola

Reputation: 4967

Unfortunately it's not possible.

You could create a server-side composition, which behaves like Accordion but then you could design the component so that you can add buttons to tab captions. You could start with something like this:

public class MyAccordion extends CustomComponent {

    public MyAccordion() {

        VerticalLayout layout = new VerticalLayout();
        setCompositionRoot(layout);
        // TODO layout should contain all tabs and tab captions
    }
}

Another option would be to create an extension by using GWT or Javascript and on the client-side modify DOM so that there a two buttons on tab captions.

Upvotes: 1

Related Questions