I want to create a context-menu under a right click for every Event in SmartGWT Calendar or simply handle right-click on event to display a pop-up window.
calendar.addEventClickHandler(new EventClickHandler() {
@Override
public void onEventClick(TimetableEventClick event) {
// TODO Auto-generated method stub
}
});
Code above don't let me to differ actions depending on left/right mouse was clicked. There is a handler I can add to calendar instance:
calendar.addRightMouseDownHandler(new RightMouseDownHandler() {
@Override
public void onRightMouseDown(RightMouseDownEvent event) {
// TODO Auto-generated method stub
}
});
...but how can I get info which event was clicked exactly? No event.getId() available, neither anything similar. I suppose getX(), getY() and playing with position is not a solution?
BTW: Is handling right-clicks in GWT still a bad habit? Should I leave its functionality for a browser?