task_pending_upload.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:3k
源码类别:
电子政务应用
开发平台:
Java
- <%
- String root = ConfigParaLoader.getParameter("rootUrl");
- if( request.getParameter("type") !=null && Integer.parseInt( request.getParameter("type") ) == 1 ) //上载
- {
- String attachURL = ConfigParaLoader.getParameter("workflowAttachmentUrl");
- attachURL += SubPathGenerater.getSeperator() + SubPathGenerater.getSubPath( root + SubPathGenerater.getSeperator() + attachURL);
- click = ( SubTaskValueBean )session.getAttribute( "click" );
- // Initialization
- mySmartUpload.initialize( pageContext );
- mySmartUpload.setTotalMaxFileSize( 100000 );
- // Upload
- mySmartUpload.upload();
- mySmartUpload.save( root + SubPathGenerater.getSeperator() + attachURL );
- if( mySmartUpload.getRequest().getParameter("subNote") != null )
- click.setSubNote( mySmartUpload.getRequest().getParameter("subNote") );
- Collection c = click.getSubFiles();
- for (int i=0;i<mySmartUpload.getFiles().getCount();i++)
- {
- com.vnex.intranet.upload.File myFile = mySmartUpload.getFiles().getFile(i);
- if (!myFile.isMissing())
- {
- WorkflowFileValueBean wf = new WorkflowFileValueBean();
- wf.setName( myFile.getFileName() );
- wf.setTitle( attachURL + "/" + myFile.getFileName() );
- wf.setDescription( myFile.getFileName() );
- c.add(wf);
- }
- }
- SubTaskDao dao = new SubTaskDao();
- SubTaskValueBean sub = dao.getSubTask(subtaskId);
- sub.setSubNote(click.getSubNote());
- click = sub;
- click.setSubFiles(c);
- session.setAttribute("click",click);
- }
- if( request.getParameter("type") !=null && Integer.parseInt( request.getParameter("type") ) == 2 )
- {
- if( mySmartUpload.getRequest().getParameter("subNote") != null )
- click.setSubNote(request.getParameter("subNote") );
- String files[] = request.getParameterValues("attachments");
- if(files!= null)
- {
- for(int i = 0; i<files.length; i++)
- {
- SubPathGenerater.deleteFile( root + SubPathGenerater.getSeperator() + files[i] );
- click.removeFile( files[i] );
- }
- SubTaskDao dao = new SubTaskDao();
- SubTaskValueBean sub = dao.getSubTask(subtaskId);
- sub.setSubFiles(click.getSubFiles());
- sub.setSubNote(click.getSubNote());
- click = sub;
- session.setAttribute("click",click);
- }
- }
- //proxy.UpdateSubtask(click);
- %>