12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <%@ page contentType="text/html; charset=UTF-8" language="java" %>
- <%@ page language="java"
- import="com.sysmodel.XFormFactory,
- com.sysmodel.listmodel.xmlmodel.impl.FormListImpl,
- com.sysmodel.listmodel.xmlmodel.impl.*,
- com.sysmodel.listmodel.xmlmanager.xmlobjdll.ListModeldllable,
- com.sysmodel.listmodel.xmlmanager.xmlobjdll.ListModeldllImpl,
- java.util.ArrayList"%>
- <%
- String listid = request.getParameter("listid") == null ? "" : request.getParameter("listid");
- String deltype = request.getParameter("deltype") == null ? "" : request.getParameter("deltype");
-
- FormListImpl FormList = null;
- if(session.getAttribute("FormList"+listid) == null){
- return;
- } else {
- FormList = (FormListImpl)session.getAttribute("FormList"+listid);
- }
-
- if(!deltype.equals("")){
- if(deltype.equals("pagesize")){
-
- QueryListImpl QueryListImpl = (QueryListImpl)FormList.getQueryList();
- QueryListImpl.setPageSize(0);
-
- }
-
- else if(deltype.equals("pageorder")){
-
- QueryListImpl QueryListImpl = (QueryListImpl)FormList.getQueryList();
- QueryListImpl.setHaveOrder(false);
-
- }
- else if(deltype.equals("queryfield")){
-
- ArrayList list =FormList.getQueryFields();
- String classid = request.getParameter("classid") == null ? "0" : request.getParameter("classid");
- String fieldname = request.getParameter("fieldname") == null ? "" : request.getParameter("fieldname");
- String operator = request.getParameter("operator") == null ? "" : request.getParameter("operator");
- int iclassid = Integer.parseInt(classid);
- for (int i = 0 ; i < list.size() ; i++) {
- QueryFieldImpl QueryField = (QueryFieldImpl)list.get(i);
- if(QueryField.getClassid() == iclassid
- && QueryField.getDataName().equals(fieldname)
- && QueryField.getOperator().equals(operator)){
- list.remove(i);
- }
- }
- }
- else if(deltype.equals("pagetier")){
- QueryListImpl QueryListImpl = (QueryListImpl)FormList.getQueryList();
- ArrayList list = QueryListImpl.getlistFields();
- String classid = request.getParameter("classid") == null ? "0" : request.getParameter("classid");
- String fieldname = request.getParameter("fieldname") == null ? "" : request.getParameter("fieldname");
- String fieldlabel = request.getParameter("fieldlabel") == null ? "" : request.getParameter("fieldlabel");
-
- int iclassid = Integer.parseInt(classid);
- for (int i = 0 ; i < list.size() ; i++) {
- ListFieldImpl ListField = (ListFieldImpl)list.get(i);
- if(ListField.getClassid() == iclassid
- && ListField.getDataName().equals(fieldname)
- && ListField.getLabel().equals(fieldlabel)){
- list.remove(i);
- }
- }
-
- }
- }
- String doaction = request.getParameter("doaction") == null ? "" : request.getParameter("doaction");
- if(doaction.equals("reload")){
- FormListImpl FormListold =(FormListImpl)XFormFactory.getXFormModel().getFormList(listid);
- FormList = (FormListImpl)FormListold.clone();
- }
- if(doaction.equals("save")){
- ListModeldllable ListModeldll = new ListModeldllImpl();
- ListModeldll.updateFormList(FormList);
- }
- session.setAttribute("FormList"+listid,FormList);
- response.sendRedirect("design.jsp?listid="+listid+"&sessionReload=false");
- %>
|