What steps will reproduce the problem?
1. Pasted tatami-1.4,tatamix-1.4 and tatami under D:\Eclipse\plugins\DojoPlugin
2. Added the above JAR in GWT Project Properties->Java Build
Path->Libraries->Add External Jars
3.In module gwt.xml, added the following
<module>
<inherits name="com.objetdirect.tatami.Tatami"/>
<inherits name="com.objetdirect.tatami.Tatami_DojoWidget"/>
<inherits name="com.objetdirect.tatami.Tatami_DojoCharting"/>
<inherits name="com.objetdirect.tatami.Tatami_DojoGFX"/>
<inherits name="com.objetdirect.tatami.Tatami_DojoBase"/>
</module>
4) In the HTML file, present in the war folder added the following
<head>
<script type="text/javascript" language="javascript" src="dojo.js" ></script>
<script type="text/javascript">dojo.require("dojox.charting.widget.Chart2D");</script>
</head>
<body>
<div dojoType="dojox.charting.widget.Chart2d" id="simplechart" style="width:
400px; height: 300px;">
</div>
</body>
5) copied the folder dojo,dojox and dijit inside the war folder, where the
module HTML is present.
6) Use the following code in the GWT
public void onModuleLoad() {
HTMLPanel lPanelForGraphDisplay = new HTMLPanel("<div
dojoType='dojox.charting.widget.Chart2d' id='simplechart' style='width: 400px;
height: 300px;'></div>");
Chart2D chart = new Chart2D("200px", "200px");
Plot2D linePlot = new Plot2D(Plot2D.PLOT_TYPE_LINES);
chart.addPlot(linePlot);
ArrayList<Double> arl=new ArrayList<Double>();
arl.add((double) 10);
arl.add((double)20);
arl.add((double)30);
arl.add((double)40);
arl.add((double)50);
arl.add((double)60);
arl.add((double)70);
Serie<Double> mySerie1 = new Serie<Double>(arl);
linePlot.addSerie(mySerie1);
lPanelForGraphDisplay.add(chart);
}
5) compiled the code, did Run As->web application and open in chromw browser
got the following message displayed
java.lang.IllegalArgumentException: bad widget : dojox.charting.Chart2D
What is the expected output? What do you see instead?
The graph should be displayed in the HTMLPanel page
What version of the product are you using? On what operating system?
GWT 2-4-0, Windows 7
Please provide any additional information below.
in the chrome developer mode following message displayed while clicking on
dojo.js
failed loading "../dojox/gfx/svg.js
But this is present in the war folder at level where the HTML file is present
in the war folder.
Please help in resolving the issue.
Original issue reported on code.google.com by sagku...@gmail.com on 10 Jun 2012 at 6:14
Original issue reported on code.google.com by
sagku...@gmail.com
on 10 Jun 2012 at 6:14