gslender / ofcgwt

Automatically exported from code.google.com/p/ofcgwt
0 stars 0 forks source link

URL swf file in Cross site mode #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Cross side mode : linker on xs
2.
3.

What is the expected output? What do you see instead?

The swf file is not found.

What version of the product are you using? On what operating system?
Mac / Linux / GWT 1.5.3 / ofcgwt 1.0.2 

Please provide any additional information below.

The probleme is in the getSWFUrl method in ChartWidget class

Here a piece of code for fix for works in Hosted Mode and in deployed mode :

public static String getSWFURL(boolean iefix, String id) {
String baseurl = "";

// test if it in hosted mode or not.
if (GWT.isScript()) {
            baseurl = GWT.getModuleBaseURL();
        }
        else {
            baseurl = GWT.getHostPageBaseURL();
        }

        String swfurl = baseurl + "open-flash-chart.swf";
        if (iefix) swfurl += ("?id="+id+(new Date().getTime())); 
        return swfurl;
    }

Thanks for you lib !

Eric

Original issue reported on code.google.com by eric.bru...@laposte.net on 24 Oct 2008 at 5:14

GoogleCodeExporter commented 9 years ago
fixed in svn r92

Original comment by gslen...@gmail.com on 24 Oct 2008 at 9:21

GoogleCodeExporter commented 9 years ago
I'm reviewing this fix and I'm unsure why its needed. Can you explain why this 
fix is
needed as it worked before without this fix. I've also had someone now complain 
the
current SVN (with this fix) breaks things... so I'm considering pulling this 
fix.

cheers,
grant

Original comment by gslen...@gmail.com on 28 Oct 2008 at 11:03

GoogleCodeExporter commented 9 years ago
Hi, 

I cross-site gwt compilation mode, the URL of files in public folder can be 
server
not in the place of the module but in other place:

Module server by a tomcat server. 
GWT js ... by apache server.

The fix work for us but it must not be a problem for you !
We wanted to overwrite getURLSWF and onLoad method but we couldn't because of 
private
members , so we had copyed/parsed the entire source code of SVN of class 
ChartWidget
to integrate the fix.
That's why I proposed to you this fix ....

Thanks

Eric 

Original comment by eric.bru...@laposte.net on 28 Oct 2008 at 11:53

GoogleCodeExporter commented 9 years ago
I'm not sure what to say - I've got issue #9 that is asking for it to be this 
way and 
you asking for it not to be... and both of you are not being clear about why 
you need 
it. As such, I've implemented a get/set method and you can change the url to 
whatever 
you need it to be. Honestly I think you both are doing something wrong if you 
need to 
mangle the url - you shouldn't need to.

Original comment by gslen...@gmail.com on 28 Oct 2008 at 12:40

GoogleCodeExporter commented 9 years ago
Sorry but I do not wrong here.
In my case (Cross Site compilation : server serve static data (like js and img) 
and
rpc call serve by Tomcat application Server), I not have the same URL for rpc 
call,
modules and static content. The SWF is a static content serve by a Apache 
server (in
my case). The module url is not the same that the static content (in my case).
But the fix, take care about that and is work in production server and in 
Hosted Mode
(devel).
I would just help for your product ... 
Thanks for spend time.

Cheers

Eric

Original comment by eric.bru...@laposte.net on 28 Oct 2008 at 4:30

GoogleCodeExporter commented 9 years ago

Original comment by gslen...@gmail.com on 9 Jan 2009 at 5:08