Loading data from MSSQL using dhtmlxscheduler

How do we translate this code equivalent in java
The key point is to use render_sql with SQL code which includes necessary filtering rules.

Java code can use render_sql exactly the same as a PHP

docs.dhtmlx.com/doku.php?id=dhtm … operations

$scheduler->event->attach(“beforeProcessing”,“default_values”);
docs.dhtmlx.com/doku.php?id=dhtm … ex_updates

If css problems still occurs - please provide any kind of sample or link to demo, where it can be reconstructed.

here is the code
and i am not using custom css .here is the code. This is the same file form the samples folder you can copy this to a file and see create and event by dragging the dates and see the end date matches with the date on the calendar where the mouse was stopped .The enddate always shows 1 date ahead .You can use your dhtmlscheduler.js and css files. please letme know.

html, body{ margin:0px; padding:0px; height:100%; overflow:hidden; }
 
 

I think i need to explain i am loooking to pass value from javascript to configure method in servlet
Also passing the value like
var dp = new dataProcessor(“scheduler/calendarevents.do?zone=6841”);
dp.init(scheduler);

so the i want to pull the events from the database based on the zone and display them on the calendar

My servlet configure method
protected void configure() {
Connection conn= ( new DataBaseConnection()).getConnection();
SchedulerConnector c = new SchedulerConnector(conn,DBType.MSSQL);

	c.render_sql("select * from nipa.dbo.tablename where zone =6841","EVENTID","START_DATE,END_DATE,TEXT,ZONE,MON,TUE,WED,THU,FRI,SAT,SUN","","");
	
		}

How do i get the zone value here in this method ? which is 6841 before i run the render_sql command.Please explain this part

your events.php is not clear …Please explain this part .How to pass a string value at run time to the servlet?

function default_values($action){
global $user_id;// what is this value

	$event_type = $action->get_value("event_type");
	if ($event_type == "")
		$event_type = 0;
		
	$action->set_value("userId",$user_id);// what value is $user_id here ? are they both the same .Do i need to use this to pass value to the servlet? if so how do we set the value of the zone in the default values method()?  does this method need to have an argument?

please explain
}
$scheduler->event->attach(“beforeProcessing”,“default_values”);

hello Stanislav,
Looking for a response from your side please help Also in addtion to the above questions
i was trying to see about the custom sql query that you sent me in the link and this method
class updateBehavior extends ConnectorBehavior{
@Override
public void beforeUpdate(DataAction action) {
String price = data.get_value(“price”);
data.set_value(“price”,"$"+price); //modify data before saving in DB
}

    @Override
public void beforeInsert(DataAction action) {
      //include additional data in DB operation
      data.add_field("userId",1); //will be saved as part of new record
}
  }
  conn.event.attach(new updateBehavior());

i get an error when i compile data not found? i imported all the required packages for this class is there something specific for this one ?Please let me know
Thanks

Hello Stanislav waited for 3 days no answer to the questions
1.How to pass zone value from java script to the configure method in servlert? The above thread
I need to pass the value zone =6842 to servlet configure method? How do we do that?please do explain using java code using default values() method to set the value of zone=6841 and in the query of configure method using rendersql I should be able to use select statement to pull events based on zone?
2.Also explained in the above thread the date is one day ahead using your sample code. I have included the sample code for reconstruction

3.if events are overlapping in A day can the connector insert a value 1or 0 in the priority column and this should be automatic
looking for a response for the 4th day
thanks