PDA

View Full Version : error while loading open flash charts in laszlo


karun.chennuri
02-26-2009, 12:14 AM
Hi

I am trying to load open flash chart inside a laszlo window. Every time I try to do so, I see the following error on the debug console:

ERROR: data conversion error for http://localhost:3000/test_it/index: can't guess a supported mime-type from content

Following is my code snippet

<view name="win">
<handler name="oninit">
Debug.write("Inside Oninit");
this.setSource("http://localhost:3000/test_it/index");
this.play(true);
</handler>
</view>

Is it that OpenLaszlo application is failing to understand that the content getting loaded in the window is swf file?
Great if some body can help me out in fixing this issue.
Thanks

karun.chennuri
02-26-2009, 04:02 AM
I am currently using OL 4.1.1 library.

Wondering if I have to write any wrapper for openflash charts to work on OL? Or is there a simple work around.... 'am not sure but running out of ideas. If anyone has any better idea to solve this issue, would be a great help.

I am trying to call RoR controller method from openlaszlo, which in turn returns the HTML script to OL. Is this approach correct?

karun.chennuri
02-27-2009, 03:12 AM
It works when I replaced view with <html tag i.e.

I replaced my previoius code

<view name="win">
<handler name="oninit">
Debug.write("Inside Oninit");
this.setSource("http://localhost:3000/test_it/index");
this.play(true);
</handler>
</view>

with,

<html name="win" visible="true" src="http://localhost:3000/test_it/index"/>

It works, 'am able to see open flash charts, but it seem to be working only in dhtml mode not in swf mode!!! (any reason why?)

I think the whole trick in case of view is that it's not able to understand the mime-type of content, is there any way that I can set mime-type at view?

karun.chennuri
03-01-2009, 12:56 AM
I made another change in my design, i deployed open-flash-chart.swf file in the OpenLaszlo server. Now 'am directly making a call to flas chart swf file i.e.

<view name="win">
<handler name="oninit">
this.setSource("resources/open-flash-chart.swf")
</handler>
</view>

But still no luck! So i replaced with <html tag, which starts working with IE 8 but not on firefox 3.

<view name="win">
<html name="chart" src="resources/open-flash-chart.swf"/>
</view>

'am I missing any point due to which my charts aren't showing up in firefox?
If this works my next step would be to pass parameters to .swf file and see different charts. I would also like to know if any one used charting API with OpenLaszlo.

pierrearinsal
10-03-2009, 02:03 PM
hi Karun...

Have you make any improvments?

What version of open flash chart are you using?

pierrearinsal
10-03-2009, 02:32 PM
this is my code :
<canvas layout="axis: y" debug="true" proxied="false">
<view id="myMovieClip" resource="open-flash-chart.swf" width="300" height="300" />
<button text="click me" id="myButton" onclick="Debug.write('charge');myMovieClip.setSource('http://www.blabla.com/open-flash-chart.swf?data-file=3d-bar-chart.php','none');myMovieClip.play(true);" />
</canvas>


if I tape directly in the browser http://www.blabla.com/open-flash-chart.swf?data-file=3d-bar-chart.php, I have a nice 3d bar chart....

when I compile the above code with openlaszlo 4.6.1 (swf8,swf9,swf10), and upload it to blabla.com serveur, I can check on my apache log that open-flash-chart.swf is requested, and then 3d-bas-chart.php is requested too, which means that the swf is charge, and does request the data-file.

but nothing on display, no error, nothing!


HELP SOMEBODY!