%@ page language="java" contentType="text/plain; charset=UTF-8"%>
<%@ page import="com.edeal.frontline.navigation.FlRequest" %>
<%@ page import="com.edeal.frontline.grid.*" %>
<%@ page import="com.edeal.frontline.FrontlineException" %>
<%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %><%
final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass());
FlRequest flRequest = new FlRequest(request);
String code = flRequest.getRequestParameterOrAttribute("gridName");
GridData grid = (GridData)request.getAttribute(code);
if (grid.isFirstPage()) {
%>
window.document.getElementById("<%= code %>_previous").style.visibility = "hidden";
<%
} else {
%>
window.document.getElementById("<%= code %>_previous").style.visibility = "visible";
<%
}
if (grid.isLastPage()) {
%>
window.document.getElementById("<%= code %>_next").style.visibility = "hidden";
<%
} else {
%>
window.document.getElementById("<%= code %>_next").style.visibility = "visible";
<%
}
%>
window.<%= code %>_page = <%= grid.getPageNumber() %>;
var node = window.document.getElementById("<%= code %>_nbpage");
while ( node.hasChildNodes() ) {
node.removeChild(node.firstChild);
}
node.appendChild(window.document.createTextNode(' ' + (window.<%= code %>_page + 1)));
try {
emptyGridStrings['<%= code %>'] = '';
} catch (error) {
}
myGrid_<%= code %>.setRowCount(<%= grid.getNbLines() %>);
<%
String ajaxScript;
try {
ajaxScript = GridTag.printAjaxGridData(grid, code, session);
} catch (FrontlineException e) {
ajaxScript = "";
logger.error("[listAjax.jsp] - " + e.toString());
}
%><%= ajaxScript %>