Gantt diagram add-on

Hi:

Does the demo application for this add-on works? I get an error that says :
The constructor GanttTaskGeneratedColumnDescription(String, new GanttGeneratedColumn(){}, String) is undefined
before compiling, and if I skip that part, when I run the app I get this null pointer exception:

any ideas?

regards,

Hugo

Hello, I couldn’t reproduce your error, but I’m also having problems to test it under GAE local enviroment due to Serialization issues, I’ll leave the stacktrace just in case the author happens to read this:


ADVERTENCIA: Error in serialization of the application: Class spd.ui.desk.user.GroupMainView must implement serialization.
01-ago-2012 2:01:41 com.vaadin.terminal.gwt.server.GAEApplicationServlet service
GRAVE: Not serializable!
java.io.NotSerializableException: ru.bazon.vaadin.ganttdiagram.canvas.GanttDiagramCanvasHeader
	at java.io.ObjectOutputStream.writeObject0(Unknown Source)
	at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
	at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
	at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
	at java.io.ObjectOutputStream.writeObject0(Unknown Source)
	at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
	at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
	at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
	at java.io.ObjectOutputStream.writeObject0(Unknown Source)
	at java.io.ObjectOutputStream.writeObject(Unknown Source)
	at java.util.LinkedList.writeObject(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	....
	at com.vaadin.terminal.gwt.server.GAEApplicationServlet.service(GAEApplicationServlet.java:245)
	

I’ve been looking for a java gantt library compatible with GAE for ages and this one looks great, I hope the author can fix this in order to test it.
( If I’m not wrong it uses gwt to paint so it should be possible to solve problem and make it GAE compatible :smiley: )

what you said about [quote]
The constructor GanttTaskGeneratedColumnDescription(String, new GanttGeneratedColumn(){}, String) is undefined
[/quote] happened to me as well, and it’s because of missing imports. After separating the parameters individually, I realized that it was a simple problem.

One way to see which imports are needed is to write the calls like this:

  
            GanttGeneratedColumn a =new GanttGeneratedColumn()
            {
                @Override
                public Object generateCell(GanttTreeTable source, GanttTask task, String columnId)
                {
                        return task.getCompleteState() - 12;
                }
            };
            
            gdata.addGanttGeneratedColumn(new GanttTaskGeneratedColumnDescription("hi",a,"normal"));

Eclipse will suggest you the needed dependencies and after adding them, you could also use the “compressed” form used in the example by the author.

Anyway, my results after executing the sample (v 0.3.3.0) fails but now because of Serializations issues(as expected from standard behaviour commented on previous post):


01-ago-2012 3:57:14 com.vaadin.Application terminalError
GRAVE: Terminal error:
java.lang.NoClassDefFoundError: ru/bazon/pstring/ParametrizedString
	at ru.bazon.vaadin.ganttdiagram.canvas.GanttDiagramCanvasTasks.getTaskTooltipValue(ru.bazon.vaadin.ganttdiagram.canvas.GanttDiagramCanvasTasks:114)
	at ru.bazon.vaadin.ganttdiagram.canvas.GanttDiagramCanvasTasks.buildTasks(ru.bazon.vaadin.ganttdiagram.canvas.GanttDiagramCanvasTasks:61)
	at ru.bazon.vaadin.ganttdiagram.canvas.GanttDiagramCanvas.paintContent(ru.bazon.vaadin.ganttdiagram.canvas.GanttDiagramCanvas:67)
	at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:781)
....
....
ADVERTENCIA: Error in serialization of the application: Class spd.ui.desk.user.GroupMainView must implement serialization.
01-ago-2012 3:57:14 com.vaadin.terminal.gwt.server.GAEApplicationServlet service
GRAVE: Not serializable!
java.io.NotSerializableException: ru.bazon.vaadin.ganttdiagram.model.GanttTaskControlPoint
	at java.io.ObjectOutputStream.writeObject0(Unknown Source)
	at java.io.ObjectOutputStream.writeObject(Unknown Source)
	at java.util.LinkedList.writeObject(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
....
.....

Hope that vetal v can shed some light on the topic :S

After several attemps, I’ve managed to make it run disabling a few things , here’s the list of things needed:(I recommend using JAD plugin for eclipse in order to visualize the source code and then edit it with normal java editor) :

  • Make all classes Serializable
  • Make the joda DateTimeFormatter variables transient
  • Change the getTooltip method to return always “” instead of using parametrized strings ( the library was not provided, so unless you want to implement it you should comment everything that uses that class)

I just needed the plugin to visualize the canvass so it is still more or less useful for me, but certainly I expected it to work like in the demo, and that’s not the case because the search filter, the collapsed columns, the edit windows, etc are crashing when I try to use them.

One thing I haven’t been able to solve that i would like to ask here is that I when i add this component to my Tabsheet componenet, the tabs listener “disappears”, since I can no longer switch from one tab to another. What is curious is that other listeners in the same screen like buttons or links are still working, But my tabs aren’t working anymore.

I’ve tried to re-add the tab listener after adding the gantt component but still didn’t work. It seems like the component is managing the tabchange listener inside and I would like to disable that, Anyone could tell how to do so? ((obviously the component is not a tabsheet so I don’t know how it can be managing the ChangeTabListener)

pstring located in bazon.public maven repository -
http://developer.bazon.ru/maven/bazon.public/

If more concrete:

http://developer.bazon.ru/maven/bazon.public/ru/bazon/pstring/

Repository can be added by adding in pom.xml

    <repositories>
            <repository>
                    <id>bazon.public</id>
                    <url>http://developer.bazon.ru/maven/bazon.public</url>
            </repository>
    </repositories>

You can use this workaround. After some time I’ll try to find more time and add
this repo in vaadin-gantt plugin itself.

https://bitbucket.org/turtle_bazon/vaadin-gantt/

Wait for your patches. :wink:

Would be nice if there was any documentation around this nice Gantt

Chris