Select to view content in your preferred language

How to load flexviewer index application from another flex application?

501
1
03-28-2011 03:37 AM
jianhuizhou
Emerging Contributor
Hi,Everyone!
I have a thorny problem.I have a flex application A in server A and I want to load a flexviewer application B which deploy in server B.

First I met cross domain error,so I put them in the same server but in different virture path.

At the moment ,I can load the B's index.swf but it can't load widgetcontaner.Because B's index.swf load it use A's virture path,so it can't find the URL.

By the way ,I use swfloader to do this thing.I want to know if any way to load widgetcontaner using B's virture path.

Thanks!
Tags (2)
0 Kudos
1 Reply
BjornSvensson
Esri Regular Contributor
The paths of the widgets (as specified in the config.xml) is not based on the location of the config.xml file, but instead based on the location of the application.  I think in this case that might be your wrapper "another" flex application.

You can either set the paths in the config to something that works with relative paths.  Or simply write out the absolute paths with full URLs.  A tool like httpfox/fiddler/charles can be really useful to see what the application is calling (when you think it should be looking elsewhere).

By the way, why not simply open the flexviewer itself instead of trying to wrap it inside another flex application?
0 Kudos