|
|
Re: AbstractCalendarField [message #766673 is a reply to message #763787] |
Fri, 16 December 2011 08:42 |
Matthias Villiger Messages: 235 Registered: September 2011 |
Senior Member |
|
|
Hi Bertin,
Yes, you are right: There is a bug in the "New Calendar Item Provider" wizard in Indigo SR1 (see Bug 366919). As you can see this bug will be fixed for SR2.
Please find a small example on how to use the AbstractCalendarField below.
Regards,
Matthias
@Order(10.0f)
public class CalendarField extends AbstractCalendarField<CalendarField.Calendar> {
@Override
protected boolean getConfiguredLabelVisible() {
return false;
}
public class Calendar extends AbstractCalendar {
@Order(10.0f)
public class ItemProducer extends AbstractCalendarItemProvider {
@Override
protected long getConfiguredRefreshIntervallMillis() {
return 1000000L;
}
@Override
protected void execLoadItemsInBackground(IClientSession session, Date minDate, Date maxDate, Holder<ICalendarItem[]> resultHolder) throws ProcessingException {
//TODO e.g.: resultHolder.setValue(SERVICES.getService(ICalendarItemProcessService.class).loadCalendarItems(minDate, maxDate));
}
@Order(10.0f)
public class NewMenu extends AbstractMenu {
@Override
protected boolean getConfiguredSingleSelectionAction() {
return false;
}
@Override
protected String getConfiguredText() {
return Texts.get("NewCalendarItem");
}
@Override
protected void execAction() throws ProcessingException {
//TODO
}
}
}
}
}
[Updated on: Fri, 16 December 2011 08:48] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03813 seconds