Hi, everybody!
In a timeline widget, is there a way(using handlers, for example) to create events just clicking on the day(cell), like a regular Calendar does?
What I want is to add events in a timeline by clicking on a cell(day) and showing the quick event dialog, instead of using the "add event" button and select a lane.
If yes, how can I show the quick event dialog box?
If no way, can anyone point me to some directions to "simulate" this?
I'm using SmartGWT 3.1p LGPL(build 2013-02-12) on Ubuntu 12.10 with Google Chrome.
I tried that:
and that
Thanks
In a timeline widget, is there a way(using handlers, for example) to create events just clicking on the day(cell), like a regular Calendar does?
What I want is to add events in a timeline by clicking on a cell(day) and showing the quick event dialog, instead of using the "add event" button and select a lane.
If yes, how can I show the quick event dialog box?
If no way, can anyone point me to some directions to "simulate" this?
I'm using SmartGWT 3.1p LGPL(build 2013-02-12) on Ubuntu 12.10 with Google Chrome.
I tried that:
Code:
addDayBodyClickHandler(new DayBodyClickHandler() {
@Override
public void onDayBodyClick(DayBodyClickEvent event) {
// show quick event dialog
}
});
Code:
public class CustomTimeline extends Timeline implements HasCellClickHandlers,
HasCellSelectionChangedHandlers{
public CustomTimeline(){
....
this.addCellClickHandler(new CellClickHandler() {
@Override
public void onCellClick(CellClickEvent event) {
SC.say("onCellClick");
}
});
this.addCellSelectionChangedHandler(new CellSelectionChangedHandler() {
@Override
public void onCellSelectionChanged(CellSelectionChangedEvent event) {
SC.say("onCellSelectionChanged");
}
});
}
@Override
public HandlerRegistration addCellSelectionChangedHandler(
CellSelectionChangedHandler handler) {
// TODO Auto-generated method stub
return doAddHandler(handler, CellSelectionChangedEvent.getType());
}
@Override
public HandlerRegistration addCellClickHandler(CellClickHandler handler) {
// TODO Auto-generated method stub
return doAddHandler(handler, CellClickEvent.getType());
}
}
Thanks
Comment