I'm using SmartGWT on my application and have encountered some issues when trying to get events from the browser. I need to get the ONPASTE event, but when I try to use it, the method onBrowserEvent never even gets called.
Here is the code that I'm using.
import com.google.gwt.user.client.Event;
import com.smartgwt.client.widgets.RichTextEditor;
public class CustomRichTextEditor extends RichTextEditor {
public CustomRichTextEditor() {
super();
sinkEvents(Event.ONPASTE);
}
@Override
public void onBrowserEvent(Event event) {
super.onBrowserEvent(event);
System.out.println("Event.getTypeInt: " + event.getTypeInt() + " - Event.getType: " + event.getType());
switch (event.getTypeInt()) {
case Event.ONPASTE:
System.out.println("Paste Detected");
break;
}
}
}
Can anybody help me?