Hello All !!
I’m here because i can’t load my data from the result of my event.jsp and i don’t know why ! I just try all i found on this website… Help please !!
My code is just here… I’m disappointed !
Calendrier.jsp :
[code]<%@ page language=“java” contentType=“text/html; charset=ISO-8859-1”
pageEncoding=“ISO-8859-1”%>
<%@page import=“com.dhtmlx.connector.*”%>
<script type="text/javascript">
window.onload=function(){
//Config
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.config.first_hour=8;
scheduler.config.last_hour=20;
scheduler.config.start_on_monday=true;
//Creation des parametres pour l'enregistrement des donnees
scheduler.locale.labels.section_site = "Site";
scheduler.locale.labels.section_technicien= "Technicien";
scheduler.config.lightbox.sections=[
{name:"site", height:21, type:"select", map_to:"rec_type", options:[
{key:"", label:"Site 1"},
{key:"day", label:"Site 2"},
{key:"week", label:"Site 3"},
{key:"month", label:"Site 4"}
]},
{name:"time", height:72, type:"time", map_to:"auto"},
{name:"technicien", height:21, type:"select", map_to:"rec_type", options:[
{key:"", label:"Technicien 1"},
{key:"day", label:"Technicien 2"},
{key:"week", label:"Technicien 3"},
{key:"month", label:"Technicien 4"}
]} ];
//Affichage du nom de l'intervention sur le calendrier
scheduler.locale.labels.section_location="Location";
scheduler.config.details_on_create=true;
scheduler.config.details_on_dblclick=false;
//Initialisation du calendrier
scheduler.init('scheduler_here',new Date(),"week");
scheduler.setLoadMode("month");
scheduler.load("Test/jsp/templates/calendrier/event.jsp",'xml');
//Affichage
dp.init(scheduler);
};</script>
<script>myGrid = new dhtmlXGridObject("scheduler_here");
myGrid.load();
</script>
<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
<div class="dhx_cal_navline">
<div class="dhx_cal_prev_button"> </div>
<div class="dhx_cal_next_button"> </div>
<div class="dhx_cal_today_button"></div>
<div class="dhx_cal_date"></div>
<div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
<div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
<div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
</div>
<div class="dhx_cal_header">
</div>
<div class="dhx_cal_data">
</div>
</div>
[/code]
event.jsp !
<%@page import="ClassYYY"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/xml" %>
<%ArrayList<String> listeInter = new ArrayList<String>(ClassYYY.liste()); %>
<%System.out.println(listeInter); %>
<%= "<data>"%>
<%for(String intervention : listeInter){ %>
<%String[] inter = intervention.split(" "); %>
<%="<event id=\""+inter[0]+"\">"%>
<%= "<text>"+"Meeting"+"</text>"%>
<%= "<start_date>"+inter[1] +" "+ inter[2]+"</start_date>"%>
<%= "<end_date>"+inter[1] +" "+ inter[3]+"</end_date>"%>
<%= "<site><![CDATA[SPIE]]></site>" %>
<%= "<technicien><![CDATA["+inter[4]+"]]></technicien>"%>
<%= "</event>" %>
<% }%>
<%= "</data>"%>
Result of event.jsp
[code]
Meeting
<start_date>2011-01-01 08h00</start_date>
<end_date>2011-01-01 12h00</end_date>