getFormCollections.jsp 921 B

1234567891011121314151617181920212223242526
  1. <%@ page contentType="text/html; charset=UTF-8" language="java"%>
  2. <%@ page
  3. import ="java.util.*,
  4. com.sysmodel.collectmodel.xmlmodel.impl.FormCollectionImpl,
  5. com.sysmodel.XFormFactory"
  6. %>
  7. <%
  8. List formCollections = null;
  9. String type= request.getParameter("type") == null ? "" : request.getParameter("type");
  10. if(type.equals("")){
  11. formCollections = XFormFactory.getXFormModel().getFormCollections();
  12. } else {
  13. formCollections = XFormFactory.getXFormModel().getFormCollectionsByType(type);
  14. }
  15. StringBuffer sb = new StringBuffer();
  16. sb.append("<root>");
  17. for (int i = 0; i < formCollections.size(); i++) {
  18. FormCollectionImpl formCollectionImpl = (FormCollectionImpl) formCollections.get(i);
  19. sb.append("<pageid>"+formCollectionImpl.getPageid()+"</pageid>");
  20. sb.append("<description>"+formCollectionImpl.getDescription()+"</description>");
  21. }
  22. sb.append("</root>");
  23. out.print(sb.toString());
  24. %>