12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <%@ page contentType="text/html; charset=UTF-8" language="java"%>
- <%@ page language="java" import="model.setup.constant.Collection" %>
- <%@ page language="java"
- import="com.sysmodel.datamodel.xmlmodel.ModelFactory,
- com.sysmodel.datamodel.xmlmodel.able.MdpConstant,
- com.sysmodel.datamodel.xmlmodel.able.Property,
- com.sysmodel.datamodel.xmlmodel.able.Template,
- com.sysmodel.datamodel.xmlmodel.DataContent,
- java.io.PrintWriter,
- java.util.*"%>
-
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>常量信息维护</title>
- </head>
- <body>
- <%
- String nodeID = request.getParameter("nodeID")==null?"":(String)request.getParameter("nodeID") ;
- String codeName =request.getParameter("codeName") == null ? "" : request.getParameter("codeName");
- Collection cs = new Collection(nodeID,codeName,request.getContextPath());
- MdpConstant constant = ModelFactory.getSysmodel().getMdpConstantByName(codeName);
- List array_elements = constant.getListDataContent();
- DataContent dataContent = null;
- Template template = constant.getTemplate();
- List listProperty = template.getListproperty();
- int icols = listProperty.size();
- PrintWriter pw = response.getWriter();
- String lineUrl = "";
- StringBuffer sb = new StringBuffer();
- sb.append("[");
- for (int i = 0; i < array_elements.size(); i++) {
-
- dataContent = (DataContent)array_elements.get(i);
- String tempNodeId = (String)dataContent.getValue("fd_code");
- lineUrl = "list.jsp?nodeID="+tempNodeId+"&codeName="+codeName;
- sb.append("{");
- for (int j = 0; j < icols; j++) {
- Property property = (Property)listProperty.get(j);
- String showName = "";
- Object obj = dataContent.getValue(property.getName());
- if(obj instanceof java.math.BigDecimal){
- showName = obj.toString();
- } else {
- showName = dataContent.getValue(property.getName()) == null ? "" : (String)dataContent.getValue(property.getName());
- }
-
- if(j != 0) sb.append(",");
- sb.append("\""+property.getName()+"\":\""+ showName +"\"");
-
- }
- sb.append(",\"edit\":\"<a href="+lineUrl+">修改</a>\"");
- sb.append(",\"delete\":\"<img src=../../../images/button/table_del.gif onClick=destroyMapButton('"+codeName+"','"+tempNodeId+"','delete');></img>\"");
- sb.append("}");
- if(i != array_elements.size() - 1) sb.append(",");
- }
- sb.append("]\n");
- response.setContentType("text/html;charset=utf-8");
- response.getWriter().write(sb.toString());
- response.getWriter().flush();
- response.getWriter().close();
- %>
|