package com.vaadin.components.gwt.polymer.client.sampler.gwt;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.vaadin.polymer.paper.widget.PaperTab;
import com.vaadin.polymer.paper.widget.PaperTabs;
import com.vaadin.polymer.paper.widget.PaperToast;

public class PaperTabsWidgetView extends Composite {
    interface PaperTabsWidgetUiBinder extends UiBinder<HTMLPanel, PaperTabsWidgetView> {
    }

    private static PaperTabsWidgetUiBinder ourUiBinder = GWT.create(PaperTabsWidgetUiBinder.class);

    @UiField
    PaperTabs tabs;
    @UiField
    PaperToast toast;

    public PaperTabsWidgetView() {
        initWidget(ourUiBinder.createAndBindUi(this));

        tabs.setSelected("0");

        PaperTab tab = new PaperTab("dynamically created item");
        tabs.add(tab);
    }

//    @UiHandler("tabs")
//    void onNameGotPressed(CoreSelectEvent event) {
//        toast.setText("widget event handler");
//        toast.show();
//    }
}
@@ -190,16 +190,65 @@
 iField;%0A
+import com.google.gwt.uibinder.client.UiHandler;%0A
 import c
@@ -335,16 +335,134 @@
 LPanel;%0A
+import com.vaadin.polymer.iron.widget.event.IronSelectEvent;%0Aimport com.vaadin.polymer.paper.element.PaperTabElement;%0A
 import c
@@ -1141,18 +1141,16 @@
 %0A    %7D%0A%0A
-//
     @UiH
@@ -1164,18 +1164,16 @@
 %22tabs%22)%0A
-//
     void
@@ -1194,12 +1194,12 @@
 sed(
-Core
+Iron
 Sele
@@ -1215,18 +1215,81 @@
 vent) %7B%0A
-//
+        PaperTabElement tab = (PaperTabElement) event.getItem();%0A
         
@@ -1327,14 +1327,36 @@
 dler
-%22
+:%22 + tab.getTextContent()
 );%0A
-//
     
@@ -1377,13 +1377,12 @@
 ();%0A
-//
     %7D%0A%7D
+%0A

Enable commented UiHandler