I am using Struts2 JSON plugin to retrieve a list of my events in JSON format, when the page()
method is executed. My action is:
public class EventCrud extends WebAppBaseAction implements ModelDriven<Event>, Preparable{
private static final long serialVersionUID = 4626472213336441724L;
private com.infopool.dao.Event eventDao;
private Event model = new Event();
private GooglePlace placeHolder = new GooglePlace();
private List<Event> events;
public String page(){
if(events == null)
events = eventDao.findAll();
return SUCCESS;
}
}
The problem is that, Strut2 serialize the object returned by getModel()
. How i can change this behavior ?.