498bd11bf8ff6628b69e67a5279690230e3ad3bc.svn-base 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <%@ page pageEncoding="UTF-8"%>
  2. <%@ page contentType="text/html; charset=UTF-8" language="java" %>
  3. <%@ page language="java"
  4. import="com.sysmodel.XFormFactory,
  5. com.sysmodel.listmodel.xmlmodel.impl.FormListImpl,
  6. com.sysmodel.listmodel.xmlmodel.impl.PramFieldImpl"%>
  7. <%@page import="com.sysmodel.listmodel.xmlmanager.xmlobjdll.ListModeldllable"%>
  8. <%@page import="com.sysmodel.listmodel.xmlmanager.xmlobjdll.ListModeldllImpl"%>
  9. <%
  10. String name = request.getParameter("name")== null ? "" : request.getParameter("name");
  11. String action = request.getParameter("action")== null ? "" : request.getParameter("action");
  12. String listid = request.getParameter("listid") == null ? "" : request.getParameter("listid");
  13. FormListImpl FormList =(FormListImpl)XFormFactory.getXFormModel().getFormList(listid);
  14. ListModeldllable ListModeldllable=new ListModeldllImpl();
  15. PramFieldImpl PramFieldImpl= new PramFieldImpl();
  16. String classid = request.getParameter("classid") == null ? "0" : request.getParameter("classid");
  17. String valuefrom = request.getParameter("valuefrom");
  18. String isinput = request.getParameter("isinput");
  19. int iclassid = Integer.parseInt(classid);
  20. PramFieldImpl.setName(name);
  21. PramFieldImpl.setClassid(iclassid);
  22. PramFieldImpl.setValuefrom(valuefrom);
  23. PramFieldImpl.setCheckbox(new Boolean(isinput).booleanValue());
  24. if (action.equals("del")){
  25. ListModeldllable.deleteFormListPramField(FormList , PramFieldImpl);
  26. System.out.println("删除成功!!!");
  27. }else if(action.equals("add")){
  28. ListModeldllable.addFormListPramField(FormList,PramFieldImpl);
  29. System.out.println("保存成功!!!");
  30. }
  31. response.sendRedirect("list.jsp?listid="+listid);
  32. %>