plupload--重写插件自带的grid

阅读更多
client端,自定义table布局
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 
File NameSizeStatusOperation
Not Available 100% Delete


server端
@RequestMapping(value = "/additionalFiles/upload", produces = "application/json;charset=UTF-8")
	public void uploadAdditionalFiles(@RequestParam("employeeId") Long employeeId,HttpServletRequest request,HttpServletResponse response) {
		List attachmentList = new ArrayList();
		
		MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
		
		MultiValueMap map = multipartRequest.getMultiFileMap();
		if (map != null) {
			Iterator iter = map.keySet().iterator();
			while (iter.hasNext()) { 
				String str = iter.next();
				List fileList = map.get(str);
				for (MultipartFile mpf : fileList) {
					AppCommAttachment attachment = attachmentService.uploadAttachmentUnderEmployee(employeeId, mpf, Boolean.FALSE);
					attachmentList.add(attachment);
				}
			}
		}
		
		try {
			JSONObject jsonObject = new JSONObject();
			jsonObject.put("attachmentList", attachmentList);
			response.getWriter().println(jsonObject.toString());
		} catch (IOException e) {
			 
		}
	}


note that:如果想使用插件自带的table布局,需要引入jquery ui css,并且保证ui的主题一致。

你可能感兴趣的:(plupload)