%@ page import="net.sf.json.*"%>
<%@ page pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ page import="java.util.*"%>
<%@ page language="java"
import="com.sysmodel.XFormFactory,
com.sysmodel.collectmodel.xmlmodel.able.FormCollection,
com.sysmodel.collectmodel.xmlmodel.able.HiddenField"%>
<%
String begin=request.getParameter("start");
String size=request.getParameter("limited");
String callback=request.getParameter("callback");
String pagid = request.getParameter("pagid") == null ? "" : request.getParameter("pagid");
FormCollection FormCollection =(FormCollection)XFormFactory.getXFormModel().getFormCollection(pagid);
ArrayList list = FormCollection.getAlHiddenFields();
try{
int index = Integer.parseInt(begin);
int pageSize = Integer.parseInt(size);
String json = callback+"({totalProperty:100,root:[";
for (int i = 0; i < list.size(); i++) {
HiddenField PramField = (HiddenField) list.get(i);
String name = ""+PramField.getName()+"";
String value = PramField.getValue() == null ? "" :PramField.getValue();
String valuemethod = PramField.getValueMethod() == null ? "" :PramField.getValueMethod();
String del = "删除";
Map map = new HashMap();
map.put("name",name);
map.put("value", value);
map.put("valuemethod",valuemethod);
map.put("del", del);
JSONObject jsonMap = JSONObject.fromObject(map);
System.out.println(jsonMap);
json += jsonMap.toString();
if (i != pageSize && list.size() > 1) {
json += ",";
}
}
json += "]});";
System.out.println();
System.out.println(json);
System.out.println();
response.getWriter().write(json);
}catch(Exception e){
}
%>