How to use dاtmlx with j2EE ?

hi, this is my first question, i’m working in web java application and i should display a Gantt chart. i downloaded DHTMLXGantt v3.1.1 and dhtmlxConnector_java_v15_120612 and i extracte them as first step.But now i don’t know how to use these folder ? help please :cry:

Check viewtopic.php?f=15&t=32995

thanks, i add the library for connector java and i tried this code but i had JSONGanttConnector underline, where’s the problem ?

I have double-checked the jar file and it does contain JSONGanttConnector class.

i tried to download connector.java.beta.zip from this page http://forum.dhtmlx.com/viewtopic.php?f=15&t=32995 but the link didn’t work.

Hi, thanks for the reply, I dowloaded the java connector and I tried with a servlet but I didin’t have a good result, the problem that I don’t know where is the error,also mix() and enable_order() are ignored by JsonGanttConnector ,help please,thanks.

Test_conector.java

[code]import com.dhtmlx.connector.DBType;
import com.dhtmlx.connector.JSONGanttConnector;
import java.sql.Connection;
import java.sql.DriverManager;
import com.dhtmlx.connector.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Test_conector extends ThreadSafeConnectorServlet {

@Override
protected void configure(HttpServletRequest req, HttpServletResponse res) {
   Connection conn=null;
  try {
     Class.forName ("com.mysql.jdbc.Driver").newInstance ();
     conn = DriverManager.getConnection("jdbc:mysql://localhost/test","root","");
  } catch (Throwable e) {
     e.printStackTrace();
  }
  JSONGanttConnector gantt = new JSONGanttConnector(conn, DBType.MySQL);
  gantt.servlet(req, res);

// gantt.mix(“open”, “1”);
// gantt.enable_order(“sortorder”);
gantt.render_table(“task”, “id”,“text”, “start_date,duration,progress,sortorder”);

}

}[/code]

index.html

[code]



gantt.config.xml_date = “%Y-%m-%d %H:%i”;
gantt.config.scale_unit = “day”;
gantt.config.duration_unit = “day”;
gantt.config.date_scale = “%d”;
gantt.config.scale_height = “130”;
gantt.config.scale_row = “130”;
            gantt.init("res");
         gantt.load("/Test_conector");
            var dp = new dataProcessor("/Test_conector");
            dp.init(gantt);
    </script>
   
</body>[/code]

Yep, the both feature (mix, enable_order) are not supported by connector.
So you can’t use automatic order saving as in case of PHP connector.

“mix” method is used to set open property for all events, you can use beforeRender behavior for the same

docs.dhtmlx.com/connector__java_ … ender.html