actionloglist.jsp

来自「Java的框架」· JSP 代码 · 共 110 行

JSP
110
字号
<%@ include file="/common/taglibs.jsp"%>


<mcaps:userPreference key="pageSize" name="pageSize" scope="page"/>

<html>
	<head>
		<title><fmt:message key="actionLogs.title"/></title>
		<content tag="heading">
			<fmt:message key="actionLogs.heading"/>
		</content>
	</head>
	<body>
		
<SCRIPT LANGUAGE="JavaScript">
	function setFilter () {
		filterBy = document.getElementById ("filter_by");
		
		if (filterBy.selectedIndex != 0) {
			value = filterBy.options [filterBy.selectedIndex].value;
			window.document.location="<c:url value="/listActionLog.action" />?username=" + value;
		}
		else {
			window.document.location="<c:url value="/listActionLog.action" />";
		}		
	}	
</script>
	
	
		<fmt:message key="actionLogs.message"/>

		<div class="separator"></div>

		<label for="<fmt:message key="actionLog.username"/>"><fmt:message key="actionLog.username"/>:</label>
		
		<mcaps:userList key="userList" scope="page" />
		
		<select name="filter_by" id="filter_by" onchange="setFilter ()" >
			<option value="" <c:if test="${empty param.username}">selected</c:if>>--</option>
			<c:forEach items="${userList}" var="user">
				<option value="<c:out value="${user.value}"/>" 
					<c:if test="${user.value == param.username}">selected</c:if>><c:out value="${user.label}"/></option> 
			</c:forEach>	
		</select>	
		<p/>
		
		
		<c:set var="buttons">
			<button type="button" onclick="location.href='<c:url value="/mainPage.action" />'">
  			<fmt:message key="button.cancel"/>
 			</button>
		</c:set>
		

		<c:out value="${buttons}" escapeXml="false" />

			<display:table name="${actionLogList}" cellspacing="0" cellpadding="0" requestURI="" defaultsort="1" id="actionLog"
    		pagesize="${pageSize}" class="list actionLogList" export="true" style="width:80%;">
  
    		<%-- Table columns --%>
    		<display:column property="username" sortable="true" headerClass="sortable" style="width:20%;" 
    				url="/actionLog.action" paramId="sessionId" paramProperty="sessionId" 
    				titleKey="actionLog.username"/>
    				
    		<display:column property="hostName" sortable="true" headerClass="sortable" style="width:20%;" 
   					autolink="true" titleKey="actionLog.hostName" />
   							
  			<display:column sortable="true" headerClass="sortable" style="width:25%;" 
    				titleKey="actionLog.start" >
    			<fmt:formatDate value="${actionLog.start}" pattern="dd MM yyyy HH:mm:ss"/>	
    		</display:column>		
    
    		<display:column sortable="true" headerClass="sortable" style="width:25%;" 
    				titleKey="actionLog.lastRequest" >
    			<fmt:formatDate value="${actionLog.lastRequest}" pattern="dd MM yyyy HH:mm:ss"/>	
    		</display:column>		
   			
   			<display:column sortable="true" headerClass="sortable" style="width:10%;" 
   					titleKey="actionLog.bot" >
   				<c:choose>
   					<c:when test="${actionLog.bot}">
   						Yes
   					</c:when>
   					<c:otherwise>
   						No
   					</c:otherwise>
   				</c:choose>
   			</display:column>
   			
   								
    		<display:setProperty name="paging.banner.item_name" value="log"/>
    
    		<display:setProperty name="paging.banner.items_name" value="logs"/>

    		<display:setProperty name="export.excel.filename" value="Action Log List.xls"/>
    
    		<display:setProperty name="export.csv.filename" value="Action Log List.csv"/>
    
    		<display:setProperty name="export.pdf.filename" value="Action Log List.pdf"/>
			</display:table>

		<c:out value="${buttons}" escapeXml="false" />
            
		<script type="text/javascript">
		<!--
			highlightTableRows("actionLog");
		//-->
		</script>
	</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?