Package net.ftlines.wicket.fullcalendar

Examples of net.ftlines.wicket.fullcalendar.EventSource


  protected void respond(AjaxRequestTarget target) {
    Request r = getCalendar().getRequest();
    String eventId = r.getRequestParameters().getParameterValue("eventId").toString();
    String sourceId = r.getRequestParameters().getParameterValue("sourceId").toString();

    EventSource source = getCalendar().getEventManager().getEventSource(sourceId);
    Event event = source.getEventProvider().getEventForId(eventId);

    onClicked(new ClickedEvent(source, event), new CalendarResponse(getCalendar(), target));
  }
View Full Code Here


  protected boolean onEvent(AjaxRequestTarget target) {
    Request r = getCalendar().getRequest();
    String eventId = r.getRequestParameters().getParameterValue("eventId").toString();
    String sourceId = r.getRequestParameters().getParameterValue("sourceId").toString();

    EventSource source = getCalendar().getEventManager().getEventSource(sourceId);
    Event event = source.getEventProvider().getEventForId(eventId);

    int dayDelta = r.getRequestParameters().getParameterValue("dayDelta").toInt();
    int minuteDelta = r.getRequestParameters().getParameterValue("minuteDelta").toInt();
    boolean allDay = r.getRequestParameters().getParameterValue("allDay").toBoolean();
View Full Code Here

  protected boolean onEvent(AjaxRequestTarget target) {
    Request r = getCalendar().getRequest();
    String eventId = r.getRequestParameters().getParameterValue("eventId").toString();
    String sourceId = r.getRequestParameters().getParameterValue("sourceId").toString();

    EventSource source = getCalendar().getEventManager().getEventSource(sourceId);
    Event event = source.getEventProvider().getEventForId(eventId);

    int dayDelta = r.getRequestParameters().getParameterValue("dayDelta").toInt();
    int minuteDelta = r.getRequestParameters().getParameterValue("minuteDelta").toInt();

    return onEventResized(new ResizedEvent(source, event, dayDelta, minuteDelta), new CalendarResponse(
View Full Code Here

      int localOffset = DateTimeZone.getDefault().getOffset(null) / 60000;
      int minutesAdjustment = remoteOffset - localOffset;
      start = start.plusMinutes(minutesAdjustment);
      end = end.plusMinutes(minutesAdjustment);
    }
    EventSource source = getCalendar().getEventManager().getEventSource(sid);
    EventProvider provider = source.getEventProvider();
    String response = getCalendar().toJson(provider.getEvents(start, end));

    getCalendar().getRequestCycle().scheduleRequestHandlerAfterCurrent(
      new TextRequestHandler("application/json", "UTF-8", response));
View Full Code Here

        List<ObjectAssociation> dateAssociations = elementSpec.getAssociations(CollectionContentsAsFullCalendarFactory.OF_TYPE_DATE);
       
       
        int i=0;
        for (ObjectAssociation dateAssociation : dateAssociations) {
            final EventSource association = new EventSource();
            association.setTitle(dateAssociation.getName());
            association.setEventsProvider(new DateAssociationEventsProvider(model, dateAssociation));
            association.setEditable(true);
            String color = COLORS[i++ % COLORS.length];
            association.setBackgroundColor(color);
            association.setBorderColor(color);
            config.add(association);
        }

        config.setAspectRatio(2.5f);
       
View Full Code Here

  protected void respond(final AjaxRequestTarget target) {
    final Request r = getCalendar().getRequest();
    final String eventId = r.getRequestParameters().getParameterValue("eventId").toString();
    final String sourceId = r.getRequestParameters().getParameterValue("sourceId").toString();

    final EventSource source = getCalendar().getEventManager().getEventSource(sourceId);
    final Event event = source.getEventProvider().getEventForId(eventId);

    onClicked(new ClickedEvent(source, event), new CalendarResponse(getCalendar(), target));
  }
View Full Code Here

  {
    final Request r = getCalendar().getRequest();
    final String eventId = r.getRequestParameters().getParameterValue("eventId").toString();
    final String sourceId = r.getRequestParameters().getParameterValue("sourceId").toString();

    final EventSource source = getCalendar().getEventManager().getEventSource(sourceId);
    final Event event = source.getEventProvider().getEventForId(eventId);

    final int dayDelta = r.getRequestParameters().getParameterValue("dayDelta").toInt();
    final int minuteDelta = r.getRequestParameters().getParameterValue("minuteDelta").toInt();
    final boolean allDay = r.getRequestParameters().getParameterValue("allDay").toBoolean();
View Full Code Here

        response.getTarget().add(entryContainer);
        eventProvider.eventClicked(event, response);
      }
    };
    calendar.setMarkupId("calendar");
    final EventSource eventSource = new EventSource();
    eventSource.setEventsProvider(eventProvider);
    config.add(eventSource);
    form.add(calendar);

  }
View Full Code Here

  protected boolean onEvent(final AjaxRequestTarget target) {
    final Request r = getCalendar().getRequest();
    final String eventId = r.getRequestParameters().getParameterValue("eventId").toString();
    final String sourceId = r.getRequestParameters().getParameterValue("sourceId").toString();

    final EventSource source = getCalendar().getEventManager().getEventSource(sourceId);
    final Event event = source.getEventProvider().getEventForId(eventId);

    final int dayDelta = r.getRequestParameters().getParameterValue("dayDelta").toInt();
    final int minuteDelta = r.getRequestParameters().getParameterValue("minuteDelta").toInt();

    return onEventResized(new ResizedEvent(source, event, dayDelta, minuteDelta), new CalendarResponse(
View Full Code Here

  @Override
  protected void onRegisterEventSourceHook(final MyFullCalendarConfig config, final ICalendarFilter filter)
  {
    if (filter instanceof TeamCalCalendarFilter) {
      // Colors are handled event based, this is just the default value
      final EventSource eventSource = new EventSource();
      eventProvider = new TeamCalEventProvider(teamEventDao, (TeamCalCalendarFilter) filter);
      eventSource.setEventsProvider(eventProvider);
      eventSource.setBackgroundColor("#1AA118");
      eventSource.setColor("#000000");
      eventSource.setTextColor("#222222");
      config.add(eventSource);
    }

  }
View Full Code Here

TOP

Related Classes of net.ftlines.wicket.fullcalendar.EventSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.