it's a spring mvc controller, see it like mapping. Of course if you go to a zul page, it's normal that you return html, that's why you need separate url for json.
chillworld ( 2016-04-29 11:46:23 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I want to implement JQuery Fullcalendar in ZK application. In javascript side i need json string. That why i want to use Spring rest Services for JSON response. How can i achieve this please share your idea.
Look below code.
$.get("/json", function(data, status){
alert("Data: " + data + "\nStatus: " + status);
});
We have a sample application for testing where we have spring boot, with spring MVC integrated :
A controller looks like :
@Controller
public class HelloController {
@RequestMapping("personInJson")
public @ResponseBody Person getPersonInJson(){
return new Person("chill", "world", new Date());
}
}
The method one will return a Person as json data.
Greetz chill.
it's a spring mvc controller, see it like mapping. Of course if you go to a zul page, it's normal that you return html, that's why you need separate url for json.
chillworld ( 2016-04-29 11:46:23 +0800 )editAsked: 2016-04-27 10:22:19 +0800
Seen: 36 times
Last updated: Apr 27 '16
ZK Calender Begin time with min
Calendar translation (german) for setWeekOfYear(true)
Can I dowload the ZK Calenda demo? [closed]
how to set today's date as default value in datebox?
How to add zCalendar events on startup through java code.
restrict user to Enter date into Datebox but can only Select...