%@page import="com.edeal.frontline.grid.GridData.GridCellContent"%>
<%@ page language="java" contentType="text/plain;charset=UTF-8"%>
<%
/******************************************************************************
* Copyright (c) 2000-2005 e-Deal
*
* e-Deal S.A.
* 55 rue Brillat Savarin
* 75013 Paris
* France
* T: +33 (0)1 53 80 80 30
* F: +33 (0)1 73 01 69 77
* http://www.e-deal.com
*
* La diffusion de ce code source sous quelque forme que ce soit sans
* l'autorisation de E-DEAL est interdite.
*
* Vous êtes autorisés à modifier ce code source uniquement pour votre usage
* propre et sous réserve que les mentions de copyright demeurent intactes.
*
* Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou
* implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour
* responsable des dommages pouvant résulter de l'utilisation de ce code
* source.
******************************************************************************/
// Please note! If you change this file in any way, please make the same changes to any
// JSP file containing the following string: //**listAjax.jsp**//
%><%@ page import="com.edeal.frontline.navigation.FlRequest" %>
<%@ page import="com.edeal.frontline.grid.*" %>
<%@ page import="com.edeal.frontline.*" %>
<%@ page import="com.edeal.frontline.grid.EdealGrid" %>
<%@ page import="java.util.*" %>
<%@ page import="com.edeal.frontline.FrontlineException" %>
<%@ page import="com.edeal.frontline.navigation.EdealBigTabsNavigation" %>
<%@ page import="com.edeal.frontline.navigation.EdealBigTabsNavigation.BigTabsParams" %>
<%@page import="java.util.Enumeration"%>
<%@page import="com.edeal.frontline.helper.ActorBaseHelper"%>
<%@page import="com.edeal.frontline.helper.custom.ActorHelper"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@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");
if (code == null) {
String paramCode = flRequest.getRequestParameterOrAttribute("code");
String gn=((paramCode==null?"":paramCode) + "_gridname");
code = flRequest.getRequestParameterOrAttribute(gn);
if (code == null) {
code = paramCode;
}
}
GridData grid = (GridData)flRequest.getAttribute(code);
boolean isEmbedded = flRequest.getAttribute(code + "_Embedded") != null;
boolean isEmbedded2 = grid.isEmbedded();
String type = (String)flRequest.getAttribute("objSql");
if (type==null) {
type=(String)flRequest.getAttribute(code+"_objSql");
}
boolean fIsListEmbedded=isEmbedded || isEmbedded2;
FlContext context = flRequest.getContext();
EdealBigTabsNavigation bTabNav = new EdealBigTabsNavigation(flRequest);
bTabNav.setBigTabsParameterValue(BigTabsParams.SelectedTab, "1");
DataDictionary dico = context.getDataDictionary();
String pEditMode=flRequest.getParameter("editmode");
boolean fUpdateMode=("true".equals(pEditMode));
String pAllowUserUpdate=flRequest.getParameter("allowupdate");
boolean fAllowUpdate=("true".equals(pAllowUserUpdate));
// is preview to be displayed ?
String pDisplayPreview=flRequest.getSearchCriteria("$$preview");
boolean fDisplayPreview=("true".equals(pDisplayPreview));
String pGridHeight=flRequest.getParameter("gridheight");
EdealGrid edealGrid=new EdealGrid();
edealGrid.setName(code);
edealGrid.buildColumns(session, context, grid);
int totalNbOfRecs=grid.getTotalNbOfRecords();
boolean fDisplayCounter=(totalNbOfRecs!=0);
int pageNumber=grid.getPageNumber()+1;
fAllowUpdate=fAllowUpdate && grid.isUpdatable();
if (fAllowUpdate) {
ActorBaseHelper actorHlpr=ActorBaseHelper.factory(ActorBaseHelper.getSessionActor(session));
fAllowUpdate=fAllowUpdate && actorHlpr.canUseObjectForOperation(type,AccessControlManager.EDIT);
}
String jsGridObject=bTabNav.getBigTabsParameterValue(BigTabsParams.NameSearchGridJs);
String[] updColumnFields=grid.getColumnUpdFld();
boolean canUpdateList=((updColumnFields!=null) && (updColumnFields.length>0));
// can we mass select entries ?
boolean isMassSelect=grid.isMassSelectable();
String previewToken=grid.getPreviewCacheToken();
ListPreviewCache.PreviewCache previewCache=null;
if (previewToken!=null) {
previewCache=ListPreviewCache.factory(flRequest.getSession()).getCache(previewToken);
}
if(grid.getNbRows()==0){
%>
<% if(!(grid.isFirstPage() && grid.isLastPage())){%> <%if(!grid.isFirstPage()){%> <%} if (fDisplayCounter) {%> <%=Utils.getMessage(session, "F608C", "Page")%> <%=pageNumber+"/"+totalNbOfPages%><%= " - ("+totalNbOfRecs+")"%> <%} else { %> <%=Utils.getMessage(session, "F608C", "Page")%> <%=pageNumber %> <% } %> <%if(!grid.isLastPage()){ %> <% if (totalNbOfPages>1) { %> <%}%> <%}%> <%}%> |
<% if (fAllowUpdate && !fUpdateMode) { %>
"> |
<%=cmtTitle%>
<% if (cmtStatus != null) {
if (allowedToEdit) {
String fieldsToBeUpdated=updColumnFields[4];
Vector
<%=Utils.formatToWeb(cmtContent, false)%>
<% } if (type!=null && request.getAttribute(type)!=null) { request.removeAttribute(type); } %>