Skip to main content

jMaki and GWT : how to begin

5 replies [Last post]
jeanbaptiste
Offline
Joined: 2008-05-02
Points: 0

Hi all,

I'm just trying jmaki-charting-gwt. But i have a problem when i ran it in hosted mode.
The development shell tried to load 'MochiKit/Base.js', and failed. This issue is fatal, and GWT app doesn't run.

I thought that all resources were in jmaki-charting-gwt-0.9.1.jar. But it seems that they are not found.

I would like to know if there are an other step to do in addition to inherit in module with the line :

Thank you for your answers and for this good job !

jb

Message was edited by: jeanbaptiste

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jeanbaptiste
Offline
Joined: 2008-05-02
Points: 0

Hi Greg,

I've just updated with your new version from this week-end (thank you for this job), and it seems that a conflict occurs between GWT-Ext and jMaki.
Yes, i added jar file in shell and compile, no problem.

Without GWT-Ext, pie chart is displayed correctly, it works. But when i add the GWT-Ext third-part and associated Ext js, in the worst case, PieChart isn't displayed, otherwise an error occurs :

Error loading jmaki.widgets.jmaki.charting.pie.Widget : id=jmaki_chart_0
Script: http://localhost:8888/gwt.myapp.Simulateur/Simulateur.html (line: 158).
Message: Invalid argument

I'm searching the origin of this conflict.

This error occurs only on IE. When i run with Firefox, piechart is displayed and there's no javascript error.

Message was edited by: jeanbaptiste

Added precision on error : only IE

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi JeanBaptiste,

The invalid argument on IE usually has to do with a CSS style being undefined or less than 0 when we for example set the size of the chart.

One other issue could be that the GWT Ext uses the a similar library.

Any chance you could send me that app and I can look at it?

My email is gmurray71(a)dev.java.net or my first and last name at sun.com.

Thanks,

Greg Murray

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi again,

I found the error which was caused by Ext modifying the array prototype with a remove and indexOf function. I have created a function that is now applied to the datasets before processing that removes these functions:

The latest 0.9.3 or better should work now. I tested on IE 7 and Firefox.

Get the latest from:

https://jmaki-charting.dev.java.net/servlets/ProjectDocumentList?folderI...

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi JeanBaptiste,

Are you including the jar file in the classpath for both the shell and complie?

I just gave these a run in hosted mode and did have a problem with the sample at:

https://ajax.dev.java.net/gwt-charting.html

The changes I put in for displaying the title caused issues for the case where you initialize without an Axes.

I've fixed that in the 0.9.2 and am able to see the examples fine.

I merged the Mochikit / Plotkit resources into a single file following the 0.8.x releases and I suspect you are working with a previous install?

The latest and greatest (including a fully built war file) are at:

https://jmaki-charting.dev.java.net/servlets/ProjectDocumentList?folderI...

-Greg

jeanbaptiste
Offline
Joined: 2008-05-02
Points: 0

Hi Greg,

Thank you for your answer.

I'm using jMaki 0.9.1 but i tried to integrate the jMaki lib in my existing project. I suspected conflict with an other library.
I began a new empty project with the jMaki library and added other lib until i saw conflict.
These other libraries are : gwt-ext ( http://code.google.com/p/gwt-ext/ ) and Tatami ( http://code.google.com/p/tatami/ ).

I don't understand exactly problem, but in order to solve conflict, i added libraries in my module xml description in this order :
* jMaki
* Gwt-Ext (uses Ext, yui)
* Tatami (uses dojo)

I thank you again for your answer.

Jean-Baptiste