%@page import="com.edeal.frontline.helper.custom.RequesterHelper"%> <% /****************************************************************************** * 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. ******************************************************************************/ %><%@page session="true"%> <%@ page import="com.edeal.frontline.navigation.*" %> <%@ page import="java.io.*" %> <%@ page import="java.sql.*" %> <%@ page import="java.util.*" %> <%@ page import="com.edeal.frontline.*" %> <%@page import="java.text.DecimalFormat"%> <%@page import="java.text.NumberFormat"%> <%@page import="com.edeal.frontline.controller.actions.ForwardAction"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@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); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); String id; try { id = flRequest.getParameter("id"); } catch (Exception e) { id = ""; } ForwardAction.throwExceptionIfNotFromForward(flRequest); RequesterBean Requester; try { Requester = new RequesterBean(id, context); } catch (Exception e) { Requester = null; } String pFormat = flRequest.getParameter("format"); String pSepChoice = flRequest.getParameter("sepChoice"); String pDelChoice = flRequest.getParameter("delChoice"); String separator = flRequest.getParameter("sepValue"); String delimiter = flRequest.getParameter("delValue"); String pHeaders = flRequest.getParameter("headers"); if("SEMICOL".equalsIgnoreCase(pSepChoice)) { separator = ";"; } else if("TAB".equalsIgnoreCase(pSepChoice)) { separator = "\t"; } if("QUOTE".equalsIgnoreCase(pDelChoice)) { delimiter = "\""; } String strErrMsg = null; Vector vectParams = null; try { vectParams = Requester.getQueryParameters(); } catch (Throwable ex) { strErrMsg = ex.getMessage(); } Connection cx = null; Statement stmt = null; ResultSet rs = null; if(strErrMsg == null) { try { String[] args = null; if(vectParams != null && !vectParams.isEmpty()) { args = new String[vectParams.size()]; for(int i = 0; i < vectParams.size(); i++) { Hashtable row = (Hashtable)vectParams.elementAt(i); String[] values = Utils.translateParameterValues(context, request.getParameterValues( "Param" + (String)row.get("num"))); if(values == null) { args[i] = ""; } else if(values.length == 1) { args[i] = values[0]; } else { args[i] = Utils.implodeList(values, ";"); } } } RequesterHelper requesterHelper = new RequesterHelper(Requester); Hashtable hash = requesterHelper.execute(args); cx = (Connection)hash.get("Connection"); stmt = (Statement)hash.get("Statement"); rs = (ResultSet)hash.get("ResultSet"); } catch (Throwable ex) { strErrMsg = ex.getMessage(); } } try { if(strErrMsg == null) { try { if("viewhtml".equalsIgnoreCase(pFormat)) { response.setContentType("text/html"); %>