Statistics
| Branch: | Revision:

m2u-upass-admin / WebContent / jsp / ss105_content / ibssContentPagination.jsp @ 59:2710c1867e0c

History | View | Annotate | Download (3.85 KB)

1 0:ea666cc7880e hadi
<%@ taglib uri="/WEB-INF/tld/struts-html-el.tld" prefix="htmlEL" %>
2
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
3
<%@ taglib uri="/WEB-INF/tld/struts-bean-el.tld" prefix="beanEL" %>
4
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>
5
<%@ taglib uri="/WEB-INF/tld/struts-logic-el.tld" prefix="logicEL" %>
6
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
7
8
9
<c:if test="${not empty contentForm.map.contentsBean}">
10
<bean:define id="viewBean" name="contentForm" property="contentsBean"/>
11
<bean:define id="pagination" name="viewBean" property="pagination" />
12
<bean:define id="enquiryCurrentPageNo" name="viewBean" property="enquiryCurrentPageNo" />
13
<bean:define id="enquiryTotalPageNo" name="viewBean" property="enquiryTotalPageNo" />
14
<bean:define id="paginationList" name="viewBean" property="paginationList" />
15
<bean:define id="searchLinkName" name="viewBean" property="searchLinkName" />
16
17
<%
18
    java.util.HashMap paramsName = new java.util.HashMap();
19
	paramsName.put("SECONDARY_TOKEN", request.getSession().getAttribute("PRIMARY_TOKEN"));
20
	pageContext.setAttribute("paramsName", paramsName);
21
%>
22
23
<ul class="previousNext">
24
<logic:equal name="pagination" property="firstPageNumber" value="-1">
25
	<li><bean:message key="general.link.first" /></li>
26
</logic:equal>
27
<logic:notEqual name="pagination" property="firstPageNumber" value="-1">
28
	<bean:define id='firstPageNumber' name="pagination" property="firstPageNumber"/>
29
	<li>
30
		<%
31
			paramsName.put("p", firstPageNumber);
32
		%>
33
		<htmlEL:link action="${searchLinkName}" name="paramsName" onclick="overlay();">
34
			<u><bean:message key="general.link.first" /></u>
35
		</htmlEL:link>
36
	</li>
37
</logic:notEqual>
38
39
<logic:equal name="pagination" property="previousPageNumber" value="-1">
40
	<li><bean:message key="general.link.previous"/></li>
41
</logic:equal>
42
<logic:notEqual name="pagination" property="previousPageNumber" value="-1">
43
	<bean:define id='previousPageNumber' name="pagination" property="previousPageNumber"/>
44
	<li>
45
		<%
46
			paramsName.put("p", previousPageNumber);
47
		%>
48
		<htmlEL:link action="${searchLinkName}" name="paramsName" onclick="overlay();">
49
			<u><bean:message key="general.link.previous" /></u>
50
		</htmlEL:link>
51
	</li>
52
</logic:notEqual>
53
54
<li>
55
<bean:define id="currentPageNumber" name="pagination" property="currentPageNumber"/>
56
	<logicEL:iterate id="paginationList" name="viewBean" property="paginationList">
57
	<%
58
		paramsName.put("p", paginationList);
59
	%>
60
		<c:choose>
61
			<c:when test='${paginationList eq currentPageNumber}'>
62
				<bean:write name="paginationList"/>
63
			</c:when>
64
			<c:otherwise>
65
				<htmlEL:link action="${searchLinkName}" name="paramsName" onclick="overlay();">
66
					<bean:write name="paginationList"/>
67
				</htmlEL:link>
68
			</c:otherwise>
69
		</c:choose>
70
	</logicEL:iterate>
71
</li>
72
73
<logic:equal name="pagination" property="nextPageNumber" value="-1">
74
	<li><bean:message key="general.link.next" /></li>
75
</logic:equal>
76
<logic:notEqual name="pagination" property="nextPageNumber" value="-1">
77
	<bean:define id='nextPageNumber' name="pagination" property="nextPageNumber"/>
78
	<li>
79
		<%
80
			paramsName.put("p", nextPageNumber);
81
		%>
82
		<htmlEL:link action="${searchLinkName}" name="paramsName" onclick="overlay();">
83
			<u><bean:message key="general.link.next" /></u>
84
		</htmlEL:link>
85
	</li>
86
</logic:notEqual>
87
88
<logic:equal name="pagination" property="lastPageNumber" value="-1">
89
	<li><bean:message key="general.link.last" /></li>
90
</logic:equal>
91
<logic:notEqual name="pagination" property="lastPageNumber" value="-1">
92
	<bean:define id='lastPageNumber' name="pagination" property="lastPageNumber"/>
93
	<li>
94
		<%
95
			paramsName.put("p", lastPageNumber);
96
		%>
97
		<htmlEL:link action="${searchLinkName}" name="paramsName" onclick="overlay();">
98
			<u><bean:message key="general.link.last" /></u>
99
		</htmlEL:link>
100
	</li>
101
</logic:notEqual>
102
</ul>
103
</c:if>