Select to view content in your preferred language

Enhanced Search Widget for FlexViewer 2.1

158848
767
10-25-2010 02:13 PM
RobertScheitlin__GISP
MVP Emeritus
All Here is my next widget in the FlexViewer 2.1 series

Special thanks to Erwan Caradec for contributing to this code.

The Enhanced Search Widget extends the standard search widget with a floating data grid and a new spatial query w/buffering.

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e
Tags (2)
0 Kudos
767 Replies
RobertScheitlin__GISP
MVP Emeritus
Ken,
   Are you talking about the widget itself or the fixed or floating datagrid?
0 Kudos
KenCarrier
Deactivated User
Robert,

I am talking about the datagrid. I was wondering if it would be possible to have this open in the bottom left hand corner under the widget itself. This way the map is still visible, rather than having it open in the middle of the screen. Any help would be greatly appreciated.

Ken,
   Are you talking about the widget itself or the fixed or floating datagrid?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ken,

   If you look at the live sample site you will see that the Fixed Datagrid can be positioned at a defined location. See the documentation for details.
0 Kudos
KenCarrier
Deactivated User
Ken,

   If you look at the live sample site you will see that the Fixed Datagrid can be positioned at a defined location. See the documentation for details.


Robert,

Thank you I looked over the FixedDG and the only issue I have is it does not close when the widget is closed. I am assuming this is because it is defined within the UI element. What I was hoping to do was position the FloatDG somewhere other than the middle of the screen. I did not know if there was a way to do this. I like the FixedDG but if the widget that is associated with it is closed then I would want the FixedDG to close as well. Does that make sense?
0 Kudos
KenCarrier
Deactivated User
Robert,

I think I figured out my original problem and thank you for the help. Inside the ResizeTitleWindowSkin.mxml code I modified this block to have an x and y.

<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:fb="http://ns.adobe.com/flashbuilder/2009" blendMode="normal" mouseEnabled="false"
    minWidth="76" minHeight="76" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5"
xmlns:mx="library://ns.adobe.com/flex/mx" x="-402" y="270">

This makes the Results window open directly beneath the widget. The only issue I am running into is that when the user resizes the window at any point then when the widget reopens the x and y location can take the Results window off the screen.

Is there anyway to for lack of a better term, justify the Results window so the x and y are based on the top left part of the Results window so it never goes off the screen after being resized.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ken,

   You could add an event listener for the map resize. The best route would probably be to convert the code to an actual widget though.
0 Kudos
KenCarrier
Deactivated User
Ken,

   You could add an event listener for the map resize. The best route would probably be to convert the code to an actual widget though.


Would the map resize event listener work when the Results window is resized? The issue does not have anything to do with the map itself more so the Results window. So if the Results window is resized then when it is opened again it goes off the screen.

More specifically when the user expands the Results window horizontally the next time it opens it goes off screen because of how I am specifying the x and y.
0 Kudos
MichaelMillspaugh
New Contributor
Hi Robert,

I wanted to ask you if there is a way to pull in data from a specified column into the SearchLayerList vs. having to type in the alias for each record in that column? I tried adding in the Alias from the intended column but it has a comma separating the value (Ex: LastName, FirstName) so nothing was in the SearchLayerList.

Great tool by the way!

Thanks,
Mike
michael.millspaugh@osan.af.mil
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Michael,

  I am not sure what you are talking about. When you specify a field to be used by the widget you use the true field name and provide an alias if you do not want the map services alias for that field.

<field name="DESCRIPTION" alias="Description" gridfield="true" />


Maybe you should provide your configuration for that layer.
0 Kudos
HeenaLee
Regular Contributor
Hi Robert,

Thank you for the enhanced search widget. It helps a lot within our organization. BTW, I have same problem that Simon posted. I am using Flex 2.4. Only one layer has issue with getting a grid result. I don't know if this relates to the data. It displays data and Error #1034 on the dialog box and empty data in grid result. The data is pulled from ArcSDE 10. It had Raster field originally in PGDB, but the Raster field has been removed when it was migrated to SDE. I am attaching screen image, map service, and eSearch Widget xml file. Thank you for your time looking into this.

Heena
GIS Coordinator
Village of Algonquin
0 Kudos