|| | |||Browse by category|
http://www.kbpublisher.com - http://www.kbpublisher.com
[b]text[/b] - Bold text.
[u]text[/u] - Underline text.
[i]text[/i] - Italic text.
[color=green]text[/color] - Colored text.
[url]kbpublisher.com[/url] - kbpublisher.com
[url=kbpublisher.com]text[/url] - text
[email]email@example.com[/email] - firstname.lastname@example.org
[h1]text[/h1] - Caption text.
- item 1
- item 2
- item 1
- item 2
How to implement a gantt chart thin-client sample with custom server action ?
The attached example demonstrates the bare essentials of thin-client (DHTML) support for Gantt charts.
To run the application:
1. Extract the attached .zip file to JViews_Home\tools\tomcat\webapps,
2. Make sure the jviews.jar and gantt.jar files are in the \WEB-INF\lib folder,
3. Launch Tomcat, and
http://localhost:8080/gantt/index.html in Internet Explorer or a similar browser.
The server side
The entire source code is kept in one file,
GanttChartServlet.java (see the folder ...\WEB-INF\classes), so that the entire server-side implementation can be seen in one go.
GanttChartServlet class implements the
IlvGanttServlet class and defines the obligatory
createServletSupport method. This method creates an instance of the
IlvGanttServletSupport class. The
getChart method of this class creates a Gantt chart based on a simple data model, defined in the
The data model creates two activites with a constraint in between.
In order to demonstrate how the chart can react to a signal from the client side, an
IlvLabel object has been added to the Gantt sheet. When a client views the application and clicks on the activity or constraint graphics in the Gantt sheet, the server side changes the label to reflect the class type of the graphic clicked on. The name of the action is
MY_ACTION, and the interaction is coded by adding a server action to the servlet support class with the
The client side
IlvGanttView object. The
IlvInteractor instance 'MyInteractor', enabling interaction with the server side, is then created. Each time the mouse is clicked, a
MY_ACTION signal is sent to the server.
Finally, a simple zoom in the interactor with a tooltip is created inside an