<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.hotent.platform.model.system.SysBaseParam, com.hotent.core.util.StringUtil, java.util.*, net.sf.json.JSONObject" %> <% List params = (List) request.getAttribute("paramList"); for(Object obj: params) { SysBaseParam param=(SysBaseParam)obj; String sourceType = param.getSourceType(); String paramValue=param.getParamValue(); Long paramId=param.getParamId(); String sourceKey=param.getSourceKey(); %> <%=param.getParamName()%> <% if (sourceType.equals("input")) { %> class="date" <%}else{%>class="inputText "<%}%>type="text" name="<%=paramId%>" value="<%=paramValue%>" style="width: 200px;"> <% } else if (sourceType.equals("radio")) { Iterator it = getIterator(sourceKey); while (it.hasNext()) { Map.Entry mapEntry = (Map.Entry) it.next(); %> checked="checked" <% }%> name="<%=paramId%>" value="<%=mapEntry.getKey()%>"><%=mapEntry.getValue()%> <% } } else if (sourceType.equals("select")) { Iterator it = getIterator(sourceKey); %> checked="checked" <% }}%>class="test" name="<%=paramId%>" value="<%=mapEntry.getKey()%>"><%=mapEntry.getValue()%> <% } } else if (sourceType.equals("dict")) { %>
<%} %> <%=param.getDescription()%> 删除 <% } %> <%! public Iterator getIterator(String source){ JSONObject json = JSONObject.fromObject(source); Iterator iter = json.keySet().iterator(); Map map = new HashMap(); while (iter.hasNext()) { String key = (String) iter.next(); String value = json.getString(key); map.put(key, value); } Set set = map.entrySet(); Iterator it = set.iterator(); return it; } %>