a0324d21683e750fea1a78e018253a5984373634.svn-base 1.6 KB

123456789101112131415161718192021222324252627282930
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%@ page language="java"
  3. import="com.sysmodel.XFormFactory,
  4. com.sysmodel.collectmodel.xmlmodel.impl.FormCollectionImpl,
  5. com.sysmodel.collectmodel.xmlmodel.impl.HiddenFieldImpl,
  6. com.sysmodel.collectmodel.xmlmanager.xmlobjdll.CollectModeldllImpl"%>
  7. <%
  8. String pagid = request.getParameter("pagid") == null ? "" : request.getParameter("pagid");
  9. String name = request.getParameter("name") == null ? "" : request.getParameter("name");
  10. String value = request.getParameter("value") == null ? "" : request.getParameter("value");
  11. String valueMethod = request.getParameter("valueMethod") == null ? "" : request.getParameter("valueMethod");
  12. String action = request.getParameter("action") == null ? "" : request.getParameter("action");
  13. String result = "";
  14. FormCollectionImpl FormCollectionImpl =(FormCollectionImpl)XFormFactory.getXFormModel().getFormCollection(pagid);
  15. HiddenFieldImpl HiddenFieldImpl = new HiddenFieldImpl();
  16. CollectModeldllImpl CollectModeldllImpl = new CollectModeldllImpl();
  17. HiddenFieldImpl.setName(name);
  18. HiddenFieldImpl.setValue(value);
  19. HiddenFieldImpl.setValueMethod(valueMethod);
  20. if(action.equals("add")){
  21. result = CollectModeldllImpl.addMdpCollectHiddenField(FormCollectionImpl , HiddenFieldImpl);
  22. }else if(action.equals("edit")){
  23. result = CollectModeldllImpl.updateMdpCollectHiddenField(FormCollectionImpl , HiddenFieldImpl);
  24. }else if (action.equals("del")){
  25. result = CollectModeldllImpl.deleteMdpCollectHiddenField(FormCollectionImpl , HiddenFieldImpl);
  26. }
  27. response.sendRedirect("list.jsp?pagid="+pagid+"&name="+name);
  28. %>