Add new fields

Hi people!

I’m trying add two new fields to the database.
One is “types”, a select bottom. It’s for change the color based on the selected type.

var type=[
                        {key:'', label: 'Normal'},
                        {key:'exam', label: 'Exam'},
                        {key:'birthday', label: 'Birthday'},
                        {key:'other', label: 'Other'};
                ];
scheduler.config.lightbox.sections=[
                        {name:"type", height:20, map_to:"type", type:"select", options: type}
]

But who can I do it on the server side? I’ve tried this: docs.dhtmlx.com/doku.php?id=dhtm … ntegration but I’m working with java and the method set_options() not find it.
And the other field is “user_email”. I don’t want it in the lightbox, only get the HttpSession and save email on the database to know who has saved an event.

Any help? Thanks!

Anyone??

Hello,

Be sure to check samples included in Java connectors. And while there is no sample which demonstrates set_options usage that function is present there and you can use it the same way as in PHP samples.

Kind regards,
Ilya

Thanks.
I’ve checked samples included in Java connectors but there aren’t samples with the scheduler because SchedulerConnector.java has no function set_options(); However, GridConnector.java has it.

Hi again!
I’ve been done things and now I have other problem.
I’ve created this:

public void beforeProcessing(DataAction action) {
		String subject = action.get_value("subject");
                String location = action.get_value("location");
                action.add_field("subject",subject);
                action.add_field("location",location);
	}

And in configure() I call this method with attach().
Render_table():

c.render_table("events","event_id","start_date,end_date,event_name,details,subject,location","","");

The select mode do it correct and I can see values of subject and location field but when I try to insert,delete or update…file log writes this:

If I put subject and location fields in the extra fields of render_table() I can save all the fields into the db but when I load the page only show the others. But in the file log the select query is correct:

Anyone know what’s happening or what can I do?

Solve it!