myforder.jsp
上传用户:lm2018
上传日期:2015-12-12
资源大小:30449k
文件大小:3k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page language="java" pageEncoding="GBK"%>
  2. <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
  3. <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
  4. <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
  5. <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
  6. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  10. <title>无标题文档</title>
  11. <script>
  12. function newForder(){
  13. var url="${pageContext.request.contextPath}/Jsp_file/folder/newforder.html";
  14. var dialogArguments = window;
  15. var features="dialogWidth=400px;dialogHeight=400px;help=no;status=yes";
  16. var ff=showModalDialog(url,dialogArguments,features);
  17. }
  18. function buildnewForder(){
  19. var forder = document.getElementById("newforder").value;
  20. location.href="${pageContext.request.contextPath}/folder.do?method=newforder&fordername="+forder;
  21. }
  22. function xiugai(id){
  23. var val = window.prompt("请输入新的文件夹名", "文件名");
  24. if(val.length<=0){
  25. alert("修改失败");
  26. return false;
  27. }
  28. location.href="${pageContext.request.contextPath}/folder.do?method=xiugaiforder&fordername="+val+"&forderid="+id;
  29. }
  30. function xx(){
  31. alert("还没有实现");
  32. }
  33. </script>
  34. </head>
  35. <body>
  36. <html:form  action="/folder" method="post">
  37. <input type="hidden" id="newforder"/>
  38. <html:hidden property="method" />
  39. <table width="100%" border="1">
  40.   <tr>
  41.     <td align="center">文件夹名称</td>
  42.     <td align="center">创建时间</td>
  43.     <td align="center">操作</td>
  44.   </tr>
  45.   <logic:notPresent name="myFolderList">
  46.    <tr>
  47.    <td colspan="3">暂时没有数据</td>
  48.    </tr>
  49.   </logic:notPresent>
  50.   <logic:present name="myFolderList">
  51.    <logic:empty name="myFolderList">
  52.    <tr>
  53.    <td colspan="3">暂时没有数据</td>
  54.    </tr>
  55.    </logic:empty>
  56.    <logic:notEmpty name="myFolderList">
  57.    <logic:iterate id="myforder" name="myFolderList">
  58.     <tr>
  59.     <td align="center">
  60.      <html:link action="/userFile.do?method=enterForder&forderid=${myforder.forder}">
  61.      <bean:write name="myforder" property="virtualfordername"/>
  62.      </html:link>
  63.     </td>
  64.     <td align="center">
  65.      <bean:write name="myforder" property="createtime"/>
  66.     </td>
  67.     <td align="center">
  68.     <a href="${myforder.forder}" onclick="xx();">[共享]</a>&nbsp;&nbsp;
  69.     <INPUT type="button" value="改名" onclick="return xiugai('${myforder.forder}');"/>&nbsp;&nbsp;
  70. <html:link action="/folder.do?method=deleteFolder&forderid=${myforder.forder}" onclick="return window.confirm('你确定删除吗?');">删除</html:link>
  71.     </td>
  72.   </tr>
  73.    </logic:iterate>
  74.    </logic:notEmpty>
  75.   </logic:present>
  76.   
  77.  
  78.   <tr>
  79.     <td colspan="3" align="center">
  80. <input type="button" value="新建文件夹" onclick="newForder();" name="ddd" />
  81. </td>
  82.   </tr>
  83. </table>
  84. </html:form>
  85. </body>
  86. </html>