Select to view content in your preferred language

looking for 2.0 Beta flexviewer.swc

1082
7
07-29-2010 08:19 AM
JorgeFiallega
Emerging Contributor
FlexViewer 1.0 download came with a the core library FlexViewer-1.0.swc located at FlexViewer\flexviewer-src-1.0\FlexViewer of the dowload.
FlexView 1.3 did not have this swc available, or I was not able to find it (I was working from source anyways and did not become an issue)
I was hoping that with FlexViewer 2.0 the compiled version will come with the core library in the form of a swc. I have not been able to find it.
Any idea if available and where I can find it, or do I have to produce my own library ?
Tags (2)
0 Kudos
7 Replies
JorgeFiallega
Emerging Contributor
I really wish there was an answer for this. Specially moving forward with FlexViewer2.2 and so on
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jorge,

  I never understood what the need for the swc is when people as for it? Why do you believe you need it? I produce widgets all the time for the viewer and have 2.1 and 2.2 versions of those widgets and don't need the swc to do this.
0 Kudos
JorgeFiallega
Emerging Contributor
OK, so maybe you have to straight me out on this, and I would love not to need it, but this is my usecase.
I need to add FlexViewer as a component that can be drooped into a bigger application. So lets call it FlexViewerComponent.mxml. I don't want to add all the FlexViewer sourcecode to the bigger project when in this case what I want is a library that allows me to add flexviewer as a tab in my application. Something like:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
      xmlns:s="library://ns.adobe.com/flex/spark" 
      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
      xmlns:viewer="com.mycompany.component.*" >
 <s:layout>
  <s:VerticalLayout/>
 </s:layout>
 
 
 <fx:Style source="defaults.css"/>
 
 <fx:Declarations>
  <!-- Place non-visual elements (e.g., services, value objects) here -->
 </fx:Declarations>
 <mx:TabNavigator width="100%" height="100%">
  <s:NavigatorContent label="Simulator" width="100%" height="100%">
   <viewer:SimulatorComponent />
  </s:NavigatorContent>
  <s:NavigatorContent label="FlexViewer" width="100%" height="100%">
   <viewer:FlexViewerComponent />   
  </s:NavigatorContent>
 </mx:TabNavigator>
 
 
</s:Application>


and where viewer:FlexViewerComponent looks ofcourse like the index.swf pretty much, so something like
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
   xmlns:s="library://ns.adobe.com/flex/spark" 
   xmlns:mx="library://ns.adobe.com/flex/mx"
   xmlns:managers="com.esri.viewer.managers.*"
   xmlns:viewer="com.esri.viewer.*" height="100%" width="100%">

 <fx:Declarations>
  <!-- Place non-visual elements (e.g., services, value objects) here -->
 </fx:Declarations>
 
 
 <fx:Metadata>
  [ResourceBundle("ViewerStrings")]
 </fx:Metadata>

 <s:layout>
  <s:BasicLayout/>
 </s:layout>
 
 <viewer:ViewerContainer>
  <viewer:mapManager>
   <managers:MapManager/>
  </viewer:mapManager>
  <viewer:uiManager>
   <managers:UIManager/>
  </viewer:uiManager>
  <viewer:widgetManager>
   <managers:WidgetManager/>
  </viewer:widgetManager>
  <viewer:configManager>
   <managers:ConfigManager/>
  </viewer:configManager>
  <viewer:dataManager>
   <managers:DataManager/>
  </viewer:dataManager>
 </viewer:ViewerContainer>
 
 
</s:Group>




Does it make sense?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jorge,

   OK I see what you want to do. The swc that was packaged with the 1.x sample viewer was never intended to be used that way. If you read the developer guide it was only intended to be used for producing a widget that was for the sample viewer without needing the sample viewer source code.
0 Kudos
JorgeFiallega
Emerging Contributor
Ah, OK.
I just created the library that I am going to use, I have a few corners to iron out, but good for the most part.
I guess I am interested to know if there is any interest on this, even keeping it in a maven repository.

Really thanks a lot for the explanation.
0 Kudos
ReneRubalcava
Esri Frequent Contributor
I don't even remember what was in the core swc, but technically you could load the swf standalone in your app, but not sure what kind of interaction you were hoping to get with it from the rest of your application. I think you'd just need to load viewer into it's own domain to avoid conflicts. Not an elegant solution, but something you could probably play with.
0 Kudos
JorgeFiallega
Emerging Contributor
I thought I was almost there but not quite.
I created a FlexViewer library that contains pretty much the src/com code.
I really wanted to also add the widgets there, but I am not able to add modules from the newly created swc file. And I also wanted the assets in the swc file, but once I move the widgets to the main project, now the images are not accessible from the swc file.
I tried using the swc as an RSL and so forth, but not successful at all.
0 Kudos