Ok, I do somenthing wrong because my log file is always empty. I can’t see anything about the format.
I also put : scheduler.load(“myconnector.do?uid=”+(new Date()).valueOf()); but nothing…
This is my code(part of jsp):
<head>
<script src="codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
<script src="codebase/ext/dhtmlxscheduler_agenda_view.js" type="text/javascript" charset="utf-8"></script>
<script src="codebase/ext/dhtmlxscheduler_year_view.js" type="text/javascript" charset="utf-8"></script>
<script src="codebase/connector.js" type="text/javascript" charset="utf-8"></script>
<script src="codebase/locale_es.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="codebase/dhtmlxscheduler_glossy.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
<style type="text/css" media="screen">
html, body{
margin:10px;
padding:0px;
height:100%;
<%--overflow:hidden;--%>
}
/*event in day or week view*/
.dhx_cal_event.past_event div{
background-color:teal !important;
color:white !important;
}
/*multi-day event in month view*/
.dhx_cal_event_line.past_event{
background-color:teal !important;
color:white !important;
}
/*event with fixed time, in month view*/
.dhx_cal_event_clear.past_event{
color:teal !important;
}
</style>
<script type="text/javascript" charset="utf-8">
function init() {
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.config.day_date="%D, %d %M";
scheduler.config.lightbox.sections=[
{name:"name", height:20, map_to:"text", type:"textarea", focus:true},
{name:"description", height:60, map_to:"desc", type:"textarea"},
{name:"location", height:20, type:"textarea", map_to:"details"},
{name:"type", height:20, map_to:"type",type:"select", options:[
{key:1, label:"Nomal"},
{key:2, label: "Important"}
]},
{name:"time", height:20, type:"time", map_to:"auto"}
]
scheduler.config.start_on_monday = true;
scheduler.config.first_hour=0;
scheduler.locale.labels.section_location="Localizacion";
scheduler.locale.labels.section_type="Prioridad";
scheduler.locale.labels.section_name="Nombre"
scheduler.config.update_render="true"
scheduler.config.multi_day = true;
scheduler.config.scroll_hour=24;
scheduler.config.mark_now=true;
scheduler.locale.labels.agenda_tab = "Agenda";
scheduler.config.details_on_dblclick=true;
scheduler.templates.event_class=function(start,end,event){
if (start < (new Date())) //if date in past
return "past_event"; //then set special css class for it
}
scheduler.templates.event_text=function(start,end,event){
return "Name:<b> "+event.text+"</b><br>"+"Descr.: "+event.desc;
}
scheduler.init('scheduler_here',null,"month");
//scheduler.load("myconnector.do?uid="+scheduler.uid());
scheduler.load("myconnector.do?uid="+(new Date()).valueOf());
var dp=new dataProcessor("myconnector.do");
dp.init(scheduler);
}
</script>
and the connector is:
public class BasicConnector extends ConnectorServlet {
@Override
protected void configure() {
Connection conn= ( new DataBaseConnection()).getConnection();
SchedulerConnector c = new SchedulerConnector(conn);
c.enable_log("log.txt", true);
c.render_table("events","event_id","start_date,end_date,text");
}
}
I dont understand what is happening.