以下是我在速度模板中的日历内容:
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'User Issues',
right: 'month,agendaWeek,agendaDay'
},
selectable: true,
selectHelper: true,
select: function(start, end, allDay) {
....
}
editable: true,
events:
"http://localhost:2990/rest/issuesrestresource/1.0/message/RetrieveAllIssuesForUser"
});
下面是用于事件提要的 Rest Resource Service 的东西 - JSON - RetrieveAllIssuesForUser 方法:
@GET
@AnonymousAllowed
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Path("/RetrieveAllIssuesForUser")
public Response getAllIssueData()
{
final List<IssuesRestResourceModel> issuesRestResourceModelList = new ArrayList<IssuesRestResourceModel>();
final com.atlassian.crowd.embedded.api.User u = authenticationContext.getLoggedInUser();
ao.executeInTransaction(new TransactionCallback() // (1)
{
@Override
public List<IssuesRestResourceModel> doInTransaction()
{
///fetching issues from activeobjects and preparing list of
IssuesRestResourceModel.
}
return null;
}
});
return Response.ok(issuesRestResourceModelList.toArray()).build();
}
我的 IssueRestResourceModel 具有以下要检索的属性:
@XmlElement(name = "value")
private String message;
@XmlAttribute
private String key;
@XmlAttribute
private String start;
@XmlAttribute
private String end;
@XmlAttribute
private String issues;
@XmlAttribute
private String user = "";
上面的代码在通过 Jquery 检索事件时正常工作。但是在提供如上所示的事件 URL 时不提供事件 - 事件:“localhost/.../REstresourcemethod”
你能建议这里有什么问题吗,事件没有提供。
谢谢你