2012-05-17 30 views
0

我需要相同的帮助来填充JSON在日历上。该JSON是这样的:FullCalendar Grails中

{
“开始”: “”,
“结束”: “”,
“称号”: “”,
“总结”: “”
}

我回到这个JSON;

def createJSONEvent = { 
    def json="[" 
     json+="{" 
     json+="title:\"fede\"," 
     json+="start:'2012-05-01T22:00:00'," 
     json+="end:'2012-05-01T22:30:00'," 
     json+="allDay: false," 
     json+="url:\"${request.contextPath}/calendar/index/1\"," 
     json+="backgroundColor:'blue'," 
     json+="textColor:'black'" 
     json+="}"  
    json+="]" 
    render json 
} 

而且我想这个HTML代码来显示它:

<fullcal:calendar id="cal"> 
theme: true, 
header: { 
left: 'prev,next today', 
center: 'title', 
right: 'month,agendaWeek,agendaDay', 
}, 
columnFormat: { week: 'ddd d/M' }, 
timeFormat: 'HH:mm{ - HH:mm}', 
selectable: true, 
selectHelper: true, 
editable: true, 
events:${include(controller:"calendar", action:"createJSONEvent")} 
</fullcal:calendar> 

并没有任何反应。控制台显示:

2012-05-18 12:33:13319 [HTTP-8080-1] ERROR resource.ResourceMeta - 未找到资源:/plugins/full-calendar-1.5.1.0/css/fullcalendar .css
2012-05-18 12:33:13,324 [http-8080-1] ERROR resource.ResourceMeta - 找不到资源:/plugins/full-calendar-1.5.1.0/js/fullcalendar.min.js
2012-05-18 12:33:14082 [HTTP-8080-1] ERROR resource.ResourceMeta - 未找到资源:/plugins/full-calendar-1.5.1.0/css/fullcalendar.print.css

我错过了什么?

+0

即使你的英语不好您仍然可以只要帮助这里的人可以告诉你是问。但这个问题不是很清楚。我们不知道它是什么,你想做的事,我们不能告诉你有什么问题。你能告诉我们你已经尝试过的代码? – David

+0

是的,我想表明从JSON事件,代码是这样的, \t高清getCalendarByName(DEF日历){ \t \t高清CAL = Calendar.findById(日历) \t \t ArrayList的事件=新的ArrayList() \t \t字符串格式= “YYYY-MM-dd'T'hh:MM” \t \t cal.events.each {A - > \t \t \t的JSONObject jsonEvent = [:] \t \t \t jsonEvent.id = a.id \t \t \t jsonEvent.summary = a.summary \t \t \t jsonEvent.start = a.startDate \t \t \t jsonEvent.end = a.endDate \t \t \t jsonEvent.description = a.description \t \t \t events.add (jsonEvent) \t \t} \t \t的JSONObject JSON = [:] \t \t json.id = CAL。ID \t \t json.name = cal.name \t \t json.events =事件 \t \t返回JSON \t} – fedecarossino

+0

感谢额外的信息。在你的问题下有一个链接,说'编辑'。请点击并在您的问题中包含这些信息。阅读评论太难了。 – David

回答

0

这个问题(http://stackoverflow.com/questions/6181579/how-to-solve-grails-resource-not-found-error-for-a-plugin)表明'grails clean'可能有帮助。你试过这个吗?