added complete tree

This commit is contained in:
Athou
2013-03-22 22:11:40 +01:00
parent 31f6687b38
commit 87000b0e11
8 changed files with 128 additions and 115 deletions

View File

@@ -7,13 +7,15 @@ import org.apache.wicket.request.mapper.parameter.PageParameters;
import com.commafeed.frontend.CommaFeedSession;
import com.commafeed.model.User;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@SuppressWarnings("serial")
public abstract class JSONPage extends WebPage {
public JSONPage(PageParameters pageParameters) {
Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
getRequestCycle().scheduleRequestHandlerAfterCurrent(
new TextRequestHandler("application/json", "UTF-8", new Gson()
new TextRequestHandler("application/json", "UTF-8", gson
.toJson(getObject(pageParameters))));
}