Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\edealMobile\event\step2_guest_list.jsp
<%@page session="true" import="com.edeal.frontline.*,java.util.*"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.controller.actions.custom.EventGuestWithFormAnswerList" %> <%@ page import="com.edeal.frontline.helper.EventBaseHelper.StatusType" %> <%@ page import="com.edeal.frontline.helper.custom.PersonEventHelper" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl"%> <jsp:useBean class="com.edeal.frontline.PersonBean" id="Person" scope="request"/> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); String contextPath = (String) session.getAttribute("contextPath"); FlContext context = null; if (contextPath!=null) { context = Frontline.getContext(contextPath); } else { context = Frontline.getContext(request.getContextPath()); } DataDictionary dico = context.getDataDictionary(); String evtID = null; evtID = Utils.getRequestParameter(context,request,"evtID"); EventBean event = new EventBean(evtID,context); session.setAttribute("EventBean",event); Vector<String> evtVectStatus = PersonEventHelper.getAllStatusID(context, StatusType.PARTICIPATION, evtID); %> <HTML> <HEAD> <title><fl:getMessage code="L6546" alt="Inscrits"/></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;" /> <script language="javascript" src="<fl:webapp/>/js/edeal/libraries/jquery/jquery.js"></script> <script language="javascript"> function AjaxUtils() { // get xmlhttp object if IE or Netscape try { // IE this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { // IE this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { // mozilla this.xmlhttp = new XMLHttpRequest(); } } } AjaxUtils.prototype = { requestResponse : null, getRequest: function (url) { this.xmlhttp.open("GET",url,false); this.xmlhttp.send(null); var ret=this.xmlhttp.responseText; return ret; }, getSimpleValue: function(url) { // get simple value: url?parameterName=parameterVal; return this.getRequest(url); } } function updateStatus(pvtID) { var oldStatusVal = document.getElementById('store' + pvtID).value; var statusIDs = new Array(); var statusLbl = new Array(); var statusCode = new Array(); <% for (int j = 0; j < evtVectStatus.size(); j++) { //String propName = "EvtStatus" + j; //if (evtVectStatus.get(propName) != null) { String evtStatus = (String)evtVectStatus.elementAt(j); %> statusIDs[<%= j %>] = "<%= evtStatus %>"; statusLbl[<%= j %>] = "<%= Utils.formatToJavascript((String) dico.getRefDisp("PvtParStatus", evtStatus)) %>"; statusCode[<%= j %>] = "<%= (String) dico.getRefCode("PvtParStatus", evtStatus) %>"; <% //} } %> var oldStatus = statusIDs.indexOf(oldStatusVal); var newStatus = oldStatus; newStatus++; while (!statusIDs[newStatus]) { if (newStatus >= 0 && newStatus < <%= evtVectStatus.size() %>) { newStatus++; } else { newStatus = 0; } } document.getElementById('store' + pvtID).value = statusIDs[newStatus]; if (pvtID) { url = "<fl:webapp/>/save_object_ajax.fl?type=PersonEvent&$$presentFields=PvtParStatus&$$multivalSeparator=|&id=" + pvtID + "&PvtParStatus=" + statusIDs[newStatus]; var aj = new AjaxUtils(); var res = aj.getSimpleValue(url); //doAjax(url) dont'work on safari; document.getElementById('status-' + pvtID).className = 'tick-box selected' + statusCode[newStatus]; document.getElementById('statusLbl-' + pvtID).innerHTML = statusLbl[newStatus]; } } </script> </HEAD> <BODY> <jsp:include page="/edealMobile/menu.jsp"> <jsp:param name="URLDISP" value="EVTGUESTS"/> </jsp:include> <DIV class="result"> <table border="0" cellpadding="0" cellspacing="0"> <TR> <td> <h1 class="title"><fl:getProperty name="EventBean" property="EvtLabel" alt=""/></h1> </td> </TR> <TR> <td> <fl:getProperty name="EventBean" property="EvtCategory" alt="" postText=" "/><fl:getProperty name="EventBean" property="EvtDate" alt="" preText="(" postText=")"/> </td> </TR> </table> </DIV> <form> <% String evtStatus = Utils.getRequestParameter(context,request,"EvtStatus"); Vector stgResult = new Vector(); String keys[] = {"PvtID", "PerID", "PvtParStatus", "PvtInsStatus", "PerCounselor","PerPhone","PerCiv", "PerFstName", "PerName", "EntID", "EntCorpName","FrpID","FrpStatus"}; String sqlQuery = "SELECT PvtID, PerID, PvtParStatus, PvtInsStatus, PerCounselor, PerPhone, PerCivility.RefTe1, Person.PerFstName, Person.PerName, Person.PerEntID, Enterprise.EntCorpName, FrpID, FrpStatus"; sqlQuery = sqlQuery + " FROM PersonEvent"; sqlQuery = sqlQuery + " LEFT OUTER JOIN Person ON PvtPersonID = PerID"; sqlQuery = sqlQuery + " LEFT OUTER JOIN Enterprise ON PerEntID = EntID"; sqlQuery = sqlQuery + " LEFT OUTER JOIN FormResponse ON PvtFrpID = FrpID"; sqlQuery = sqlQuery + " LEFT OUTER JOIN RefValues PerCivility ON Person.PerCivID = PerCivility.RefID"; sqlQuery = sqlQuery + " WHERE PvtEventID = " + Utils.formatToSQL(context, evtID); sqlQuery = sqlQuery + " ORDER BY Person.PerName, Person.PerFstName"; Vector objs = new Vector(); try{ objs = BasicBean.listSQL(context, keys, sqlQuery); }catch(FrontlineException frontlineexception) { logger.error("Exception in query :",frontlineexception); } for(int i = 0; i < objs.size(); i++) { Hashtable obj = (Hashtable)objs.elementAt(i); String interlocutorID = (String)obj.get("PerID");; String entID = (String)obj.get("EntID"); String corpName = (String)obj.get("EntCorpName"); String intCivID = (String)obj.get("PerCiv"); String intFstName = (String)obj.get("PerFstName"); String intName = (String)obj.get("PerName"); String interlocutor = null; interlocutor = intCivID == null ? "" : intCivID + " "; interlocutor += intFstName == null ? "" : intFstName + " "; interlocutor += intName == null ? "" : intName; String parStatus = (String) obj.get("PvtParStatus"); String insStatus = (String) obj.get("PvtInsStatus"); String pvtId = (String)obj.get("PvtID"); %> <div class="tick-result"> <table border="0" cellpadding="0" cellspacing="0"> <TR valign="top"> <td width="100%"> <a class="tick-box selected<%= parStatus != null ? (String) dico.getRefCode("PvtParStatus", parStatus) : "" %>" id="status-<%= pvtId %>" href="javascript:updateStatus('<%= pvtId %>')"> <div class="display"><%= interlocutor %><%= (corpName != null) ? " (" + corpName + ") " : "" %></div> <div class="status" id="statusLbl-<%= pvtId %>"> <% String statusDisplay = null; try { if (parStatus != null) { statusDisplay = (String) dico.getRefDisp("PvtParStatus", parStatus); } } catch (Exception e) { } %><%= (statusDisplay != null) ? statusDisplay : "" %> </div> <div class="clear"></div> <input type="hidden" name="store<%= pvtId %>" id="store<%= pvtId %>" value="<%= parStatus %>"/> </a> </td> </TR> </table> </DIV> <% } %> </form> <jsp:include page="/edealMobile/footer.jsp"/> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de