1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <%@ page contentType="text/html; charset=UTF-8" language="java" %>
- <%@ page language="java"
- import="java.util.*,
- com.sysmodel.collectmodel.xmlmodel.impl.FormCollectionImpl,
- com.sysmodel.collectmodel.xmlmanager.xmlobjdll.CollectModeldllable,
- com.sysmodel.collectmodel.xmlmanager.xmlobjdll.CollectModeldllImpl,
- com.sysmodel.XFormFactory,
- com.sysmodel.collectmodel.xmlmodel.impl.ReportFieldImpl"
- %>
- <%
- String pageid=request.getParameter("pageid") == null ? "" : request.getParameter("pageid");
- String doaction = request.getParameter("doaction") == null ? "" : request.getParameter("doaction");
- String deltype = request.getParameter("deltype") == null ? "" : request.getParameter("deltype");
-
- FormCollectionImpl FormCollect = null;
- if(session.getAttribute("FormCollect"+pageid) == null){
- return;
- } else {
- FormCollect = (FormCollectionImpl)session.getAttribute("FormCollect"+pageid);
- }
- if(doaction.equals("reload")){
- FormCollectionImpl FormCollectold =(FormCollectionImpl)XFormFactory.getXFormModel().getFormCollection(pageid);
- FormCollect = (FormCollectionImpl)FormCollectold.clone();
- }else if(doaction.equals("save")){
- CollectModeldllImpl CollectModeldllImpl =new CollectModeldllImpl();
- CollectModeldllImpl.updateMdpCollect(FormCollect);
- }if(deltype.equals("ReportField")){
- String fieldname = request.getParameter("fieldname") == null ? "" : request.getParameter("fieldname");
- ArrayList ReportFields=FormCollect.getAllReportFields();
- for(int i=0; i<ReportFields.size(); i++){
- ReportFieldImpl ReportFieldImpl=(ReportFieldImpl)ReportFields.get(i);
- if(ReportFieldImpl.getName().equals(fieldname)){
- ReportFields.remove(i);
- }
- }
- }
-
-
- session.setAttribute("FormCollect"+pageid,FormCollect);
- response.sendRedirect("design.jsp?pagid="+pageid+"&sessionReload=false");
- %>
|