DHTMLX Java Connector

Are there any docs are something on how to use this with the Touch Grid?

Latest official version still has not support for touch grid, but you can use the attached jar and code like

[code]import java.sql.Connection;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.dhtmlx.connector.JSONCommonConnector;
import com.dhtmlx.connector.ThreadSafeConnectorServlet;

public class JSONSimpleDataSource extends ThreadSafeConnectorServlet {

protected void configure(HttpServletRequest req, HttpServletResponse res) {
	Connection conn = ( new DataBaseConnection()).getConnection();
	JSONCommonConnector data = new JSONCommonConnector(conn);
	data.servlet(req, res);
	data.render_table("touch_users", "id", "name,age,group_name,city,phone,sex,driver_license");


on client side you need just use the path to the above servlet in “url” property of touch grid.
dhtmlxconnector.zip (173 KB)

Common logic of connector (actions, parameters, options) - all the same as for normal java connectors

docs.dhtmlx.com/doku.php?id=dhtm … orjava:toc

What should the datatype be? JSON throws an error and XML removes the error but it will not load the data. Thanks

You need to use “json” as second parameter ( or just don’t use it at all - json is default data type )

If issue still occurs - try to load the data-url directly in the browser and check its response.

<?xml version='1.0' encoding='utf-8' ?>[{"id":"181827","DATE_ENT":"2011-01-10","EQUIPID":"001","EMPCODE":"BENNET","LRATE":"89.00","HOURS":"2.25","PAYTYPE":"1A"}]

is my response

Uncaught SyntaxError: Unexpected token <
dhx.DataDriver.json.toObject touchui_debug.js:3060
dhx.DataLoader.dhx.proto._onLoad touchui_debug.js:3475

this is what i get when it is set to json


that added to the json datadriver fixes it for me