Select to view content in your preferred language

Controlling the size of the window opened from the query widget linkfield

1248
4
Jump to solution
07-24-2012 10:34 AM
DaveFrame
Emerging Contributor
I would like to set the size of the window that opens from the query widget feedurl. I've tried wrapping some java around my URL, but the flex viewer doesn't seem to recognize java. Any ideas?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Dave,

   The way to do this is using this code:

QueryResultItemRenderer.mxml

            private function showLink(event:MouseEvent):void             {                 event.stopImmediatePropagation(); // don't dispatch QUERY_RESULT_CLICK since we don't want to zoom to feature                 //navigateToURL(new URLRequest(queryResultAttributes.link));                 ExternalInterface.call("window.open", queryResultAttributes.link, "win", "height=200,width=300,toolbar=no,scrollbars=yes");             }


Be sure to post Flex Viewer questions to the Flex Viewer forum here:

http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Dave,

   The way to do this is using this code:

QueryResultItemRenderer.mxml

            private function showLink(event:MouseEvent):void             {                 event.stopImmediatePropagation(); // don't dispatch QUERY_RESULT_CLICK since we don't want to zoom to feature                 //navigateToURL(new URLRequest(queryResultAttributes.link));                 ExternalInterface.call("window.open", queryResultAttributes.link, "win", "height=200,width=300,toolbar=no,scrollbars=yes");             }


Be sure to post Flex Viewer questions to the Flex Viewer forum here:

http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:
0 Kudos
DaveFrame
Emerging Contributor
Hey Robert,

Thanks for responding so quickly. Is QueryResultItemRenderer.mxml a new file or an existing one that we need to add the code to.

Thanks,
Dave Frame
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Dave,

   SO you are using the uncompiled Flex Viewer aren't you? The QueryResultItemRenderer.mxml has been around all the way back to FV 2.1. This change is not something you can do by manipulating the compiled Flex Viewer or just the xml files.
0 Kudos
DaveFrame
Emerging Contributor
Hey Robert,

Correct, we've been working with ESRI to duplicate a dashbord app they created for the city of Charlotte NC. Up to this point we've only been adding their widgets or editing existing widgets. All of the editing we've done has been in Notepad ++, and nothing has had to be compiled.

Thanks,
Dave Frame
0 Kudos