Hi there,
Some issues about smartgwt IButton or CheckboxItem in flextable.
If I set smartgwt IButton or CheckboxItem(with DynamicForm) as gwt FlexTable’s cell, the clickHandler event can not be fired. (also, the title of IButton can not show)
Is this compatible issues? Are there any suitable replacement of FlexTable in Smartgwt?
Thanks.
I find if the smartgwt button widget is set into flextable after the flextable already drawn, the click event can be catched, or the click event can not be catched.
The following is the code I tested, button b1 is set into flextable after the flextable already drawn, its click event can be catched. For button b2, the click event can not be catched.
Any idea about this?
public void onModuleLoad() {
final FlexTable t = new FlexTable();
final Button b1 = new Button("b1");
final Button b2 = new Button("b2");
t.setWidth("300px");
b1.addClickHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent event) {
SC.say("I am b1");
}});
b2.addClickHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent event) {
SC.say("I am b2");
}});
Timer timer = new Timer() {
@Override
public void run() {
t.setWidget(0, 1, b1);
}};
timer.schedule(500);
t.setWidget(0, 0, b2);
VLayout vLayout = new VLayout();
vLayout.addMember(t);
vLayout.draw();
}