Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 
 package net.ftlines.wicket.fullcalendar;
 
 import java.util.UUID;
 
 
 
 public class FullCalendar extends AbstractFullCalendar implements IBehaviorListener {
 	private static final TextTemplate EVENTS = new PackageTextTemplate(FullCalendar.class"FullCalendar.events.tpl");
 
 	private final Config config;
 
 	public FullCalendar(String idConfig config) {
 		super(id);
 		this. = config;
 		setVersioned(false);
 	}
 
 	protected boolean getStatelessHint() {
 		return false;
 	}
 
 	public Config getConfig() {
 		return ;
 	}
 
 		return new EventManager(this);
 	}
 
 	protected void onInitialize() {
 		super.onInitialize();
 		for (EventSource source : .getEventSources()) {
 			if (source.getUuid() == null) {
 				String uuid = UUID.randomUUID().toString().replaceAll("[^A-Za-z0-9]""");
 				source.setUuid(uuid);
 			}
 		}
 	}
 
 	protected void onBeforeRender() {
 		super.onBeforeRender();
 	}

Configures callback urls to be used by fullcalendar js to talk to this component. If you wish to use custom callbacks you should override this method and set them here. NOTE: This method is called every time this component is rendered to keep the urls current, so if you set them outside this method they will most likely be overwritten by the default ones.
 
 	protected void setupCallbacks() {
 
 		if ( == null) {
 		}
 		for (EventSource source : .getEventSources()) {
 			source.setEvents(.asString(new MicroMap<StringString>("url".getUrl(source))));
 		}
 
		if ( == null) {
				protected void onClicked(ClickedEvent eventCalendarResponse response) {
					onEventClicked(eventresponse);
				}
			});
		}
		if ( == null) {
				protected void onSelect(SelectedRange rangeCalendarResponse response) {
					FullCalendar.this.onDateRangeSelected(rangeresponse);
				}
			});
		}
		if ( == null) {
				protected boolean onEventDropped(DroppedEvent eventCalendarResponse response) {
					return FullCalendar.this.onEventDropped(eventresponse);
				}
			});
		}
		if ( == null) {
				protected boolean onEventResized(ResizedEvent eventCalendarResponse response) {
					return FullCalendar.this.onEventResized(eventresponse);
				}
			});
		}
		if ( == null) {
				protected void onViewDisplayed(View viewCalendarResponse response) {
					FullCalendar.this.onViewDisplayed(viewresponse);
				}
			});
		}
	}
	public void renderHead(IHeaderResponse response) {
		super.renderHead(response);
		String configuration = "$(\"#" + getMarkupId() + "\").fullCalendarExt(";
		configuration += Json.toJson();
		configuration += ");";
		response.render(OnDomReadyHeaderItem.forScript(configuration));
	}
	protected boolean onEventDropped(DroppedEvent eventCalendarResponse response) {
		return false;
	}
	protected boolean onEventResized(ResizedEvent eventCalendarResponse response) {
		return false;
	}
	protected void onDateRangeSelected(SelectedRange rangeCalendarResponse response) {
	}
	protected void onEventClicked(ClickedEvent eventCalendarResponse response) {
	}
	protected void onViewDisplayed(View viewCalendarResponse response) {
	}
	}
	public void onRequest() {
	}
New to GrepCode? Check out our FAQ X