view src/main/webapp/componentes/paginator.jsp @ 18:881e7591f3e4

new: adding paginator in books page
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Tue, 02 Jun 2015 15:09:54 +0200
parents 3e62083dbcbf
children 37840afb7b80
line wrap: on
line source

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<jsp:useBean id="sessionBean" class="de.mpiwg.web.jsp.SessionBean" scope="session" />
		
		<% String formName = request.getParameter("formName"); %>
		
		<table style="width: 300px; margin-left: auto;margin-right: auto;">
			<tr>
				<td>
					<input 
						type="image"
						src="<%=sessionBean.getApplicationBean().getPaginatorFirst()%>"
						onclick="setAction('firstPage','<%=formName%>');"/>
				</td>
				<td>
					<input 				
						type="image"
						src="<%=sessionBean.getApplicationBean().getPaginatorFr()%>"
						onclick="setAction('fastRewind', '<%=formName%>');"/>
				</td>
				<td>
					<input 				
						type="image"
						src="<%=sessionBean.getApplicationBean().getPaginatorPrevious()%>"
						onclick="setAction('previousPage', '<%=formName%>');"/>
				</td>
				<td>
				<% if (formName.equals("booksForm")) { %>
					<%=sessionBean.getBooksPage().getPaginator().getRecordStatus() %>
						
				<% } else if (formName.equals("searchForm")) { %>
					<%=sessionBean.getSearchPage().getPaginator().getRecordStatus() %>
					
				<% } %>
				</td>
				<td>
					<input 				
						type="image"
						src="<%=sessionBean.getApplicationBean().getPaginatorNext()%>"
						onclick="setAction('nextPage', '<%=formName%>');"/>
				</td>
				<td>
					<input 				
						type="image"
						src="<%=sessionBean.getApplicationBean().getPaginatorFf()%>"
						onclick="setAction('fastForward', '<%=formName%>');"/>
				</td>
				<td>
					<input 	
						src="<%=sessionBean.getApplicationBean().getPaginatorLast()%>"						
						type="image"
						onclick="setAction('lastPage', '<%=formName%>');"/>
				</td>
			</tr>
		</table>