<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"xmlns:f="http://java.sun.com/jsf/core"xmlns:h="http://java.sun.com/jsf/html"xmlns:ui="http://java.sun.com/jsf/facelets"xmlns:a4j="http://richfaces.org/a4j"xmlns:rich="http://richfaces.org/rich"xmlns:schedule="http://richfaces.org/sandbox/schedule"><ui:compositiontemplate="/pages/template.xhtml"><!--TODO write where are messages for each language located--><ui:definename="body"><p> Try out JavaScript API. For documentation see<h:outputLinkvalue="http://arshaw.com/fullcalendar/docs/">http://arshaw.com/fullcalendar/docs/</h:outputLink></p><ui:includesrc="schedule.xhtml"><ui:paramname="mode"value="ajax"/><ui:paramname="showSource"value="false"/></ui:include><div><i>CTRL+ENTER while in textarea to execute</i><textareaid="code"onkeypress="if(event.keyCode==13 && event.ctrlKey) eval(this.value)"cols="50"rows="10"> schedule.today(); var today=new Date(); var tommorow=new Date(today.getFullYear(),today.getMonth(),today.getDate()+1); schedule.select(today,tommorow); schedule.unselect(); schedule.render(); RichFaces.Notify({title:schedule.getView().name}); schedule.changeView("agendaWeek"); var items = schedule.getItems(); if(items.length>0) { var item = items[0]; item.title = window.prompt(item.title); schedule.updateItem(item); schedule.render(); } schedule.next();</textarea><inputtype="button"value="Execute"onclick="eval(document.getElementById('code').value)"/><ulstyle="float:left;"> Available methods:<li>select(startDate,endDate[,allDay])</li><li>unselect()</li><li>render()</li><li>destroy()</li><li>getView()</li><li>changeView(viewName)</li><li>prev()</li><li>next()</li><li>prevYear()</li><li>nextYear()</li><li>today()</li><li>gotoDate(year [, month, [ date ]])</li><li>incrementDate(years [, months, [ days ]])</li><li>updateItem(item)</li><li>getItems(idOrFilterFunction)</li><li>removeItems(idOrFilterFunction)</li><li>refetchItems()</li><li>addEventSource(Array/URL/Function)</li><li>removeEventSource(Array/URL/Function)</li><li>renderEvent(event,stick)</li><li>rerenderEvents()</li></ul></div><rich:insertsrc="/pages/sample_8.xhtml"highlight="xhtml"/></ui:define></ui:composition></html>