its a long code, however in summary:
in tab1 i've a table (table1) with a clickHandler that depends from another
table (table2)
in tab2 i've only display some db data

code when i switch tab

if (tabLayoutPanel.getSelectedIndex() == 0) { // tab1
 build_tab1();
clear_TAB2();
tabLayoutPanel.setSize("100%", "1245px");

}else if (tabLayoutPanel.getSelectedIndex() == 1) { // tab2
 build_tab2();
clear_TAB1();
tabLayoutPanel.setSize("100%", "1245px");
}



code tab1

table1.addClickHandler(new ClickHandler() {

public void onClick(ClickEvent event) {

              bool t = Window.confirm("continue?")

              if(t && is a radioButton in table2 checked??)
                        server call for db data
                        table1.settext(r,c,"something i need");
             else
                       Window.alert("select something in table2");
        }
});


now the problem is that if i change tab and i return in tab 1 the code in
onClick() is runned n time where n is the number of times that i switched
tab


On Thu, Mar 6, 2014 at 6:46 PM, Thomas Broyer <t.bro...@gmail.com> wrote:

> Show your code?
>
>
> On Thursday, March 6, 2014 6:22:01 PM UTC+1, Davide Micheletti wrote:
>>
>> Hi all, i've a tabLayoutPanel and in every tab there is a widget with a
>> click Handler.. If i switch tab and i click on the widget with click
>> Handler the code is runned 2 time for every switched tab.. Where i fail??
>> thanks..
>>
>> Davide
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to