java - GWT - how to get the tabText of selected tab? -
i want tab text when click on tab. this:
tabpanel.addselectionhandler(new selectionhandler<integer>() { @override public void onselection(selectionevent<integer> event) { //get tabtext here } }); but index.
assuming using tabpanel , haven't provided custom widget tabbar, this:
tabpanel.addselectionhandler(new selectionhandler<integer>() { @override public void onselection(selectionevent<integer> event) { string tabhtml = tabpanel.gettabbar().gettabhtml(event.getselecteditem()); } }); of course, underlying html of tab, <div>tab text</div>. text put in add() methods wrapped in either label, or html widget, whether have chosen display tab text html.
of course not handy, need store somewhere tab text (in tabpanel extension i'd guess, or model) @ insertion time (overriding add(...)s) , retrieve when needed (by adding simple getter them).
Comments
Post a Comment