Hello,
I have designed a simple layout with dhtmlXLayoutObject.
What I am trying to do is to put the DHXPlanner (JavaPlanner) in a section of the layout I created.
The problem is that if I add the DHXPlanner, the only thing i see is the planner (everything I created before is not rendered).
So, which is the correct way to add the DHXPlanner to a layout object?
Thanks for the replies.
<html>
<head>
<title>Calendar test</title>
<style>
html, body {
width: 100%;
height: 100%;
overflow: hidden;
margin: 0px;
background-color: #EBEBEB;
}
</style>
<script>
function doOnLoad(){
var main_layout = new dhtmlXLayoutObject(document.body, "2U");
var menu = main_layout.cells('a');
menu.setText('Calendari');
menu.setWidth('200');
menu.fixSize(1,0);
var calendar = main_layout.cells('b');
calendar.setWidth('100',"PCT");
calendar.setHeight('100',"PCT");
calendar.setText('Calendario');
calendar.attachScheduler(null, null, '<%= getScheduler(request) %>');
}
</script>
</head>
<body onload="doOnLoad()">
<script>
<%!String getScheduler (HttpServletRequest request) throws Exception {
// creates and configures scheduler instance
DHXPlanner scheduler = new DHXPlanner("./dhtmlx/dhtmlxScheduler/codebase/");
scheduler.setName("scheduler");
scheduler.setInitialDate(Calendar.getInstance().getTime());
scheduler.extensions.add(DHXExtension.TOOLTIP);
scheduler.extensions.add(DHXExtension.MINICAL);
scheduler.calendars.attachMiniCalendar(true);
DHXLightboxMiniCalendar box = new DHXLightboxMiniCalendar("minical");
scheduler.lightbox.add(box);
scheduler.load("data_processor.jsp", DHXDataFormat.JSON);
scheduler.data.dataprocessor.setURL("data_processor.jsp");
return scheduler.render();
}%>
</body>
</html>