123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <%@ page contentType="text/html; charset=UTF-8" language="java" %>
- <%@ page language="java"
- import="java.util.*,
- com.sysmodel.listmodel.xmlmodel.impl.FormListImpl,
- com.sysmodel.listmodel.xmlmodel.impl.ListFieldImpl,
- com.sysmodel.listmodel.xmlmanager.xmlobjdll.ListModeldllImpl"%>
- <%
- String listid = request.getParameter("listid") == null ? "" : request.getParameter("listid");
- String action = request.getParameter("action") == null ? "" : request.getParameter("action");
-
- ListFieldImpl ListFieldImpl = new ListFieldImpl();
-
- String showType = request.getParameter("showType") == null ? "" : request.getParameter("showType");
-
- String width = request.getParameter("width") == null ? "" : request.getParameter("width");
- String url = request.getParameter("url") == null ? "" : request.getParameter("url");
- String target = request.getParameter("target") == null ? "" : request.getParameter("target");
- String popup = request.getParameter("popup") == null ? "" : request.getParameter("popup");
-
- width = new StringBuffer(width).append("%").toString();
-
- ListFieldImpl.setShowType(showType);
- ListFieldImpl.setWidth(width);
- ListFieldImpl.setUrl(url);
- ListFieldImpl.setTarget(target);
-
- ListModeldllImpl ListModeldllImpl = new ListModeldllImpl();
- if (popup.equals("1")){
- String formWidth = request.getParameter("formWidth") == null ? "" : request.getParameter("formWidth");
- String formHeight = request.getParameter("formHeight") == null ? "" : request.getParameter("formHeight");
- String remark = request.getParameter("remark") == null ? "" : request.getParameter("remark");
-
- ListFieldImpl.setFormWith(formWidth);
- ListFieldImpl.setFormHeight(formHeight);
- ListFieldImpl.setRemark(remark);
- }
- FormListImpl FormList = null;
- if(session.getAttribute("FormList"+listid) == null){
- return;
- } else {
- FormList = (FormListImpl)session.getAttribute("FormList"+listid);
-
- ArrayList QueryListImpls = FormList.getQueryList().getlistFields();
- String classid= "";
- String dataName= "";
- String label1= "";
- String showTxt= "";
- String label2= "";
- String image= "";
- String label3= "";
-
- if(showType.equals("0")){
- classid = request.getParameter("classid") == null ? "0" : request.getParameter("classid");
-
- dataName = request.getParameter("dataName") == null ? "" : request.getParameter("dataName");
- label1 = request.getParameter("label1") == null ? "" : request.getParameter("label1");
- ListFieldImpl.setClassid(Integer.parseInt(classid));
- ListFieldImpl.setDataName(dataName);
- ListFieldImpl.setLabel(label1);
-
- }else if (showType.equals("2")){
- showTxt = request.getParameter("showTxt") == null ? "" : request.getParameter("showTxt");
- label2 = request.getParameter("label2") == null ? "" : request.getParameter("label2");
- ListFieldImpl.setShowTxt(showTxt);
- ListFieldImpl.setLabel(label2);
- }else if (showType.equals("1")){
- image = request.getParameter("image") == null ? "" : request.getParameter("image");
- label3 = request.getParameter("label3") == null ? "" : request.getParameter("label3");
- ListFieldImpl.setImage(image);
- ListFieldImpl.setLabel(label3);
- }
- if (action.equals("add")){
- QueryListImpls.add(ListFieldImpl);
- }else if (action.equals("edit")){
- String oDataName = request.getParameter("oDataName") == null ? "" : request.getParameter("oDataName");
- String oLabel = request.getParameter("oLabel") == null ? "" : request.getParameter("oLabel");
- ListModeldllImpl.updateListField(FormList,ListFieldImpl,oDataName,oLabel);
- }
- session.setAttribute("FormList"+listid,FormList);
- %>
- <script type="text/javascript">
- var url = window.opener.location.href;
- url = url.replace("sessionReload=true","sessionReload=false");
- window.opener.location.replace(url);
- window.close();
- </script>
- <%
- }
- %>
|