123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <%@ 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 = "<a href=\"edit.jsp?pagid="+pagid +"&name="+PramField.getName()+"\">"+PramField.getName()+"</a>";
- String value = PramField.getValue() == null ? "" :PramField.getValue();
- String valuemethod = PramField.getValueMethod() == null ? "" :PramField.getValueMethod();
- String del = "<a href=\"editExc.jsp?action=del&name=<"+PramField.getName() +"&pagid="+pagid +"\">删除</a>";
-
- 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){
-
- }
- %>
|