1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| @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:3306/parc", "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_links("gantt_links", "id", "source,target,type");
gantt.render_sql("select * from task where id=1 and id=2","id", "start_date,duration,text,progress,sortorder,parent"); |
Partager