-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
First of all, do you use MVC or MVVM?
In(MVC) your controller you extend SelectorComposer<component>, so override the following and put your events tehere in your calendar.
@Override
public final void doAfterCompose(Component comp) throws Exception {
}
Greetz Chill.
2 | No.2 Revision |
First of all, do you use MVC or MVVM?
In(MVC) your controller you extend SelectorComposer<component>, so override the following and put your events tehere there in your calendar.
@Override
public final void doAfterCompose(Component comp) throws Exception {
}
Greetz Chill.
3 | No.3 Revision |
First of all, do you use MVC or MVVM?
In(MVC) your controller you extend SelectorComposer<component>, so override the following and put your events there in your calendar.
@Override
public final void doAfterCompose(Component comp) throws Exception {
}
This is from an previous project of me in mvc :
/**
* After composing the page, the calendar and customerlist are initialised.
* In the calendar we put a model calendarModel with all the values of the
* deliveries that are already plannified. The two list are initialised with
* deliveries that has to be planified and the deliveries that are marked as
* selfservice.
*
* @param comp initial component
* @throws Exception can throw an exception
*/
@Override
public final void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
initCalendarModel();
calendars.setModel(calendarModel);
initCustomerList();
calendars.setContext(deletePopup);
initPopupMenu();
}
/**
* initiate the model of the calendar.
*/
private void initCalendarModel() {
calendarModel = new SimpleCalendarModel();
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
addEventsMonth(cal.getTime());
cal.add(Calendar.MONTH, 1);
addEventsMonth(cal.getTime());
cal.add(Calendar.MONTH, -2);
addEventsMonth(cal.getTime());
}
/**
* creates the content of the calendar event.
*
* @param beginDate date of the event
*/
private void addEventsMonth(Date beginDate) {
for (Delivery delivery : deliveryService.getDeliveryPlanningForMonth(beginDate)) {
CalendarEvent ce = PlanningUtil.createEvent(delivery);
calendarModel.add(ce);
}
}
I hope this helps you.
Greetz Chill.