Edit C:\galaxie\Back\galaxie\edealMobile\agenda\list.jsp
<%@page session="true" import="com.edeal.frontline.*,java.util.*"%> <%@ page import="java.util.GregorianCalendar" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.CorrespondentBean" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.AccessDeniedException" %> <%@ page import="com.edeal.frontline.PersonBean" %> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@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 todo = dico.getRefIdByCode("IntStiID","TODO"); String beginDate = flRequest.getParameter("fromDate"); //Utils.getRequestParameter(request,"fromDate",false); boolean firstCall = beginDate == null; boolean isToday = false; Date fromDate = new Date(); if (beginDate != null && !beginDate.equals(Utils.getMessage(session, "M602F", "<Date>")) && !"".equals(beginDate.trim())) { fromDate = Utils.formatDateFromWeb(session,beginDate); if (fromDate == null) { beginDate = flRequest.getParameter("oldDate"); fromDate = Utils.formatDateFromWeb(session,beginDate); if (fromDate == null) { fromDate = new Date(); } } }else { fromDate = new Date(); } GregorianCalendar fromCal = new GregorianCalendar(); GregorianCalendar today = new GregorianCalendar(); fromCal.setTime(fromDate); today.setTime(new Date()); if ( (today.get(today.DAY_OF_MONTH)==fromCal.get(fromCal.DAY_OF_MONTH)) && (today.get(today.MONTH)==fromCal.get(fromCal.MONTH)) && (today.get(today.YEAR)==fromCal.get(fromCal.YEAR)) ) isToday=true; String dateValue = Utils.formatToWebDate(session,fromDate,false); fromDate = Utils.formatDateFromWeb(session,dateValue); String actorID = (String)session.getAttribute("actorID"); Vector list = new Vector() ; if (!firstCall) { String[] field = {"IntID","IntTimeBeg","IntTimeEnd","IntSubject","IntDetails","IntCorID","IntPlace"}; //String[][] query = {{"IntActID contains (" + Utils.formatToSQL(context, actorID) + ")", "IntDate = "+Utils.formatToSQL(context,fromDate),"IntStiID = "+Utils.formatToSQL(context,todo)}}; // Why should we display only done interactions ?? String[][] query = {{"IntActID contains (" + Utils.formatToSQL(context, actorID) + ")", "IntDate = "+Utils.formatToSQL(context,fromDate)}}; String[] orderBy = {"IntTimeBeg"}; list = InteractionBean.listSummary(session,field,query,orderBy); } %> <HTML> <HEAD> <title><fl:getMessage code="L309D" alt="Agenda"/></title> <LINK href="<fl:webapp/>/edealMobile/css/css.css" rel="stylesheet" type="text/css"> <meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /> </HEAD> <BODY> <jsp:include page="/edealMobile/menu.jsp"> <jsp:param name="URLDISP" value="AGENDA"/> </jsp:include> <DIV class="action-bar" style="margin-bottom: 10px;"> <% java.text.SimpleDateFormat sdfDayName = FlLocale.getInstance(session).getSimpleDateFormat("EEE"); GregorianCalendar greg = new GregorianCalendar(); greg.setTime(fromDate); //hier greg.add(Calendar.DATE,-1); Date yesterday = greg.getTime(); //demain greg.setTime(fromDate); greg.add(Calendar.DATE,1); Date tomorrow = greg.getTime(); //last week greg.setTime(fromDate); greg.add(Calendar.DATE,-7); Date lastWeek = greg.getTime(); //next week greg.setTime(fromDate); greg.add(Calendar.DATE,7); Date nextWeek = greg.getTime(); %> <a href="<fl:webapp/>/listm_interaction.fl?fromDate=<%= Utils.formatToWebDate(session,lastWeek,false)%>"><<</a> <a href="<fl:webapp/>/listm_interaction.fl?fromDate=<%= Utils.formatToWebDate(session,yesterday,false)%>"><</a> <span class="label" style="font-size: 80%;"> <% if (isToday) {%> <fl:getMessage code="S0007" alt="Aujourd\'hui"/> <% } else { %> <%=sdfDayName.format(fromDate)%> <%= Utils.formatToWebDate(session,fromDate,false)%> <% } %> </span> <a href="<fl:webapp/>/listm_interaction.fl?fromDate=<%= Utils.formatToWebDate(session,tomorrow,false)%>">></a> <a href="<fl:webapp/>/listm_interaction.fl?fromDate=<%= Utils.formatToWebDate(session,nextWeek,false)%>">>></a> <a href="<fl:webapp/>/listm_week.fl?fromDate=<%= Utils.formatToWebDate(session,fromDate,false) %>"> <fl:getMessage code="LFFFF" alt="Hebdo"/></a> </DIV> <DIV> <form method="GET" action="<fl:webapp/>/listm_interaction.fl"> <table border="0" cellpadding="0" > <tr> <td class="criteria"> <input type="text" name="fromDate" value="<%= (fromDate != null) ? Utils.formatToWeb(session,fromDate,false,"dd/MM/yyyy") : "" %>"> <input type="hidden" name="oldDate" value="<%= (beginDate != null) ? Utils.formatToWeb(session,beginDate,false) : ""%>"> <input type="submit" value="Go !"> <a href="<fl:webapp/>/editm_interaction.fl">[+]</a> </td> </tr> </table> </form> </DIV> <% if(list != null && !list.isEmpty()){ for(int i=0; i < list.size(); i++){ Hashtable row = (Hashtable)list.elementAt(i); String id = (String) row.get("IntID"); Date beginHour = (Date) row.get("IntTimeBeg"); Date endHour = (Date) row.get("IntTimeEnd"); String subject = Utils.formatToWeb((String) row.get("IntSubject"),false); String hourBeg = Utils.formatToWebTime(session, beginHour,true,false); String hourEnd = Utils.formatToWebTime(session, endHour,true,false); String notes = (String) row.get("IntDetails"); String place = (String) row.get("IntPlace"); /* Vector vectCor = (Vector) row.get("IntCorID"); String personName = ""; String perID = null; String perPhone = null; String perMobile = null; String perMail = null; if (vectCor != null && vectCor.size() > 0) { String corID = (String) vectCor.firstElement(); PersonBean perBean = null; try { CorrespondentBean corBean = new CorrespondentBean(corID,session); perID = corBean.getCorPerID(); perBean = new PersonBean(perID,session); }catch (AccessDeniedException e){ }catch (FieldNotInitializedException ex){} if (perBean != null) { try { String perFstName = perBean.getPerFstName(); personName = perFstName +" "; }catch (FieldNotInitializedException ex){} try { String perName = perBean.getPerName(); personName += perName; }catch (FieldNotInitializedException ex){} try { perPhone = perBean.getPerPhone(); }catch (FieldNotInitializedException ex){} try { perMobile = perBean.getPerMobile(); }catch (FieldNotInitializedException ex){} try { perMail = perBean.getPerMail(); }catch (FieldNotInitializedException ex){} } } */ %> <DIV class="resultset"> <table border="0" cellpadding="0" cellspacing="0"> <TR valign="top"> <td width="20%" class="calendar-start"> <%-- if (notes != null) { //traitement 2*x x= paramétre 2 String notesStr =Utils.replace(notes,"\n"," "); String nbCharMax = (String) session.getAttribute("ActNbCharMax"); int nbMax = 20; if (nbCharMax != null) { Integer nbChar = new Integer(nbCharMax); if (nbChar != null) nbMax = nbChar.intValue(); } nbMax = 2 * nbMax; if (notesStr.length() > nbMax ) { notesStr = notesStr.substring(0,nbMax)+"."; } %> <br/><%= Utils.formatToWeb(notesStr,false)%> <% } --%> <%= hourBeg %> </td> <td width="5%"> </td> <td width="75%"> <a href="<fl:webapp/>/readm_interaction.fl?id=<%= id %>" class="title"> <%= hourBeg %><%= ((hourEnd != null) ? " - " + hourEnd : "") %> <%= (subject != null) ? subject : "" %> </a> <% if (place != null) {%> <br/><span class="important"><%= Utils.formatToWeb(place,false) %></span> <% } %> <%-- if (perID != null) { %> <a href="<fl:webapp/>/readm_person.fl?id=<%= perID%>"><%= Utils.formatToWeb(personName,false)%></a><br/> <% } %> <% if (perPhone != null) { %> <fl:getMessage code="L7015" alt="T."/> <%= Utils.formatPhoneToMobile(perPhone,session)%><br/> <% } %> <% if (perMobile != null) { %> <fl:getMessage code="L7016" alt="M."/> <%= Utils.formatPhoneToMobile(perMobile,session)%><br/> <% } %> <% if (perMail != null) { %> <fl:getMessage code="LFFFF" alt="E."/> <a href="mailto:<%= Utils.formatToWeb(perMail,false)%>"><%= Utils.formatToWeb(perMail,false)%></a> <% } --%> </td> </TR> </table> </DIV> <% } }else if (!firstCall) { %> <fl:getMessage code="L104B" alt="Aucune entrée"/> <% } %> <jsp:include page="/edealMobile/footer.jsp"/> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de