protected void onRender(Element parent, int index) {
super.onRender(parent, index);
String url = "http://www.extjs.com/forum/topics-remote.php";
ScriptTagProxy<PagingLoadResult<ModelData>> proxy = new ScriptTagProxy<PagingLoadResult<ModelData>>(url);
ModelType type = new ModelType();
type.setRoot("topics");
type.setTotalName("totalCount");
type.addField("title", "topic_title");
type.addField("topicId", "topic_id");
type.addField("author", "author");
type.addField("excerpt", "post_text");
DataField date = new DataField("lastPost", "post_time");
date.setType(Date.class);
date.setFormat("timestamp");
type.addField(date);
JsonPagingLoadResultReader<PagingLoadResult<ModelData>> reader = new JsonPagingLoadResultReader<PagingLoadResult<ModelData>>(
type);
PagingLoader<PagingLoadResult<ModelData>> loader = new BasePagingLoader<PagingLoadResult<ModelData>>(proxy, reader);