tags:

views:

28

answers:

2

I tried this code:

public class OwnFlowPanel extends FlowPanel implements HasClickHandlers{
 public HandlerRegistration addClickHandler(ClickHandler handler) {
  return addDomHandler(handler, ClickEvent.getType());
 }
}

and then I used this in another class:

OwnFlowPanel panel = new OwnFlowPanel();

panel.addClickHandler(new ClickHandler() {
 @Override
 public void onClick(ClickEvent event) {
  Window.alert("Clicked on object id: "+id);
 }
});

This didn't work :(

A: 

Nevermind! I restarted Eclipse's server and it works now :-P

Jay
A: 

You could also just put the FlowPanel into a FocusPanel (call setWidget()).

z00bs
will it make any difference in loading time? (its 3 panels)
Jay
not sure, but i guess it will. but i doubt that this will be recognizable by the user.
z00bs