Select to view content in your preferred language

Editing popup windows, PopUpRendererskin

2424
2
Jump to solution
12-11-2012 04:07 AM
LiamCollins
Emerging Contributor
Hi,

I was hoping someone could help me. I have created a popup using Viewer for Flex for my web viewer to show images taken in the field and a clickable external link (code below) and it works well.

<?xml version="1.0" ?>
<configuration>
<title>{DESCRIPT}</title>
<description>
<![CDATA[<a href='{Hyperlink_Relative_Path}'><u>Open in New Window</u></a>
<img src=â??{jpg_popup_Path}â?? width=250>
]]>
</description>

<fields>
<field name="PHOTOTYPE"/>
<field name="FIELDDATE"/>
<field name="DESCRIPT"/>
<field name="Hyperlink_Relative_path"/>
<field name="jpg_popup_Path"/>
</fields>

</configuration>

<!--
See pop-up documentation at
http://links.esri.com/flexviewer/popups
-->

What I now want to do is edit the size of the popup window for these popups. I know from previous posts that I need to edit PopUpRendererSkin.mxml I have looked at that and think I have identified the aspects of code I need to edit

<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:esri="http://www.esri.com/2008/ags"
xmlns:supportClasses="com.esri.ags.skins.supportClasses.*"
width="600"
maxHeight="400"

preinitialize="skin_preinitializeHandler(event)">

And
<supportClasses:PopUpMediaBrowser id="mediaBrowser"
height="400"
width="600"

skinClass="com.esri.ags.skins.supportClasses.PopUpMediaBrowserSkin"/>

I come unstuck with following this. I am completely new to flash builder and have no experience editing skins and struggling to pick up the concepts of it for popups. I understand it for widgets were you have an .xml file and a .swf file pointed to in your widget container, however popups donâ??t point to a .swf so I am confused by their architecture.

I guess what I need to know is what steps I need to execute so that I have a working popup for my images that I can trial and error different popup window sizes for.

Any help would be greatly appreciated.
Liam
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Notable Contributor
In a nutshell, the popupconfig.xml file is set using the <layer> tag.  This tells the API which fields/formatting, etc. to use for the popup window for each feature.

When you click on a feature that is configured for a popup, it sends the "data" to the infowindow to popup.

If you add this code to the default.css file (and have the PopUpRendererSkin.mxml file in the path listed): 

esri|PopUpRenderer {  skin-class: ClassReference("com.esri.ags.skins.PopUpRendererSkin"); }


then the information is passed "through" the popuprendererskin.mxml and can be changed/formatted/modified, etc. here before it is sent to the infowindow to "popup".

So, if you make the above change to your default.css, then you should see the changes to width/heigth that you posted above.

R_

Lots of info about this on the forums already.  If you look through these, you should get an idea of how/where the data, media, etc. is being handled.

http://forums.arcgis.com/threads/69860-PopupRenderSkin-with-radio-buttons-part-2?highlight=PopUpRend...
http://forums.arcgis.com/threads/38375-Change-media-container-size-in-Pop-Up-Window?highlight=PopUpR...
http://forums.arcgis.com/threads/64884-Popups-on-multiple-copies-of-same-service-layer?highlight=Pop...
http://forums.arcgis.com/threads/71273-Few-simple-questions-)?highlight=PopUpRendererskin
http://forums.arcgis.com/threads/47909-PopUpRendererSkin.mxml-with-Radio-Buttons?highlight=PopUpRend...
http://forums.arcgis.com/threads/67874-Popup-3.0-hide-field-if-value-null?highlight=PopUpRendererski...

View solution in original post

0 Kudos
2 Replies
RhettZufelt
MVP Notable Contributor
In a nutshell, the popupconfig.xml file is set using the <layer> tag.  This tells the API which fields/formatting, etc. to use for the popup window for each feature.

When you click on a feature that is configured for a popup, it sends the "data" to the infowindow to popup.

If you add this code to the default.css file (and have the PopUpRendererSkin.mxml file in the path listed): 

esri|PopUpRenderer {  skin-class: ClassReference("com.esri.ags.skins.PopUpRendererSkin"); }


then the information is passed "through" the popuprendererskin.mxml and can be changed/formatted/modified, etc. here before it is sent to the infowindow to "popup".

So, if you make the above change to your default.css, then you should see the changes to width/heigth that you posted above.

R_

Lots of info about this on the forums already.  If you look through these, you should get an idea of how/where the data, media, etc. is being handled.

http://forums.arcgis.com/threads/69860-PopupRenderSkin-with-radio-buttons-part-2?highlight=PopUpRend...
http://forums.arcgis.com/threads/38375-Change-media-container-size-in-Pop-Up-Window?highlight=PopUpR...
http://forums.arcgis.com/threads/64884-Popups-on-multiple-copies-of-same-service-layer?highlight=Pop...
http://forums.arcgis.com/threads/71273-Few-simple-questions-)?highlight=PopUpRendererskin
http://forums.arcgis.com/threads/47909-PopUpRendererSkin.mxml-with-Radio-Buttons?highlight=PopUpRend...
http://forums.arcgis.com/threads/67874-Popup-3.0-hide-field-if-value-null?highlight=PopUpRendererski...
0 Kudos
LiamCollins
Emerging Contributor
Much appreciated R,

That makes sense now when you explain it. I will work on it and let you know of progress thanks.

Liam
0 Kudos