Select to view content in your preferred language

Selection Widget Updated Version

50803
146
05-12-2011 05:24 AM
MarkHoyland
Frequent Contributor
The Selection widget has a "Select by Attributes" and "Select by Location" option similar to ArcGIS.
Widget link: http://www.arcgis.com/home/item.html?id=20ed6af9ab204548bbf092d51b51fef8

Version 1.5 of the widget replaces version 1.0

Enhancements and fixes include:
*Each time a query layer was added it was also being added to the TOC. This has been fixed.

*When resizing the widget, the datgrid would not resize properly. This has been fixed.

*Uses paging for selection of unique value list. This means that ALL values will be parsed regardless of the ArcGISServer setting to limit responses. There is an option to ESC out of a large query. (This is only for the Unique list, not getting features).
I have included an ESRI TaxParcel Layer that has 18,000+ records. Get Unique Values on the PSTLSTATE field to see this in action.
Available on my example site. The URL is on the Widget download page.

*Aliases can now be used. It will now use the Alias as set in the Featureclass. You can also override the Alias in the SelectionWidget.xml config file.

*ArcGis layers that have joined tables will now work with fully qualified field names. (thanks Dasa for the idea)

*Styling for selection colours has been documented in the SelectionWidget.xml config file (example provided).

*Styling for datagrid has been changed. It can now also be styled in SelectionWidget.xml config file (example provided). (thanks Mehul for the idea)

*Changed initial uniquevalue query to use "text='%'" instead of "where '1=1'" for Mike.:)

*You can now override scale range for layers.

*Link field now has a prefix/suffix option in the SelectionWidget.xml config file (naming convention the same as Robert SCheitlin's esearch widget)

*Shape_area and Shape_length can be used in the fields.

Link to previous thread :http://forums.arcgis.com/threads/24151-Selection-Widget-for-SFV2.2-(with-a-query-builder)
Tags (2)
0 Kudos
146 Replies
JeffersonFerreira_Ferreira
Deactivated User
I do not get any errors.  Just a few warnings about length not being bindable.

R_



There are many people receiving this error #2124. The widget works fine, every first open it presents this message. I reviewed all the xml and mxml and can't identify what could be wrong.
0 Kudos
RhettZufelt
MVP Notable Contributor
Hmm, if I get a chance, I'll try to re-do what I did as I still have yet to get the error.

Maybe I changed something else that I forgot about.

R_
0 Kudos
RhettZufelt
MVP Notable Contributor
Not sure what to tell you.

I just re-downloaded the SelectionWidget v1.5, added to a new FlexViewer3 project (uncompiled version), added to my module list and let it build.

I do get warning about the dispatchEvent, but if I ignore it, and do NOT make any changes (as I did above)(it seems the changes remove a warning, but don't affect functionality), it seems to be working just fine.  even with the SelectionWidget.xml that came with it, though I am not loading any of the services selected in my map.

Once I change the config to my services, it is still working fine.

Have not seen the error you mention and can't seem to reproduce.

R_

I am using IE8, Flash Builder 4.6 and the 4.6.0 SDK
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jefferson,

   The error you are getting means "Loaded file is an unknown type". I have seen this in the past when a widget is using the old infoPopup and someone mistakenly omits that line from the config xml for the widget.  So do you have this line towards the bottom of your SelectionWidget.xml?

    <zoomscale>5000</zoomscale>
    <info>widgets/InfoTemplates/InfoPopupWidget.swf</info>
</configuration>


And if so are you sure that the widgets/InfoTemplates/InfoPopupWidget.mxml is added to the modules list of your flex viewer project so that it is being compiled to a swf?
0 Kudos
JeffersonFerreira_Ferreira
Deactivated User
Jefferson,

   The error you are getting means "Loaded file is an unknown type". I have seen this in the past when a widget is using the old infoPopup and someone mistakenly omits that line from the config xml for the widget.  So do you have this line towards the bottom of your SelectionWidget.xml?

    <zoomscale>5000</zoomscale>
    <info>widgets/InfoTemplates/InfoPopupWidget.swf</info>
</configuration>


And if so are you sure that the widgets/InfoTemplates/InfoPopupWidget.mxml is added to the modules list of your flex viewer project so that it is being compiled to a swf?


rscheitlin;

These <zoomscale> and <info> tags are all commented. In fact I have a infoTemplates folder in my widgets folder, but, obviously, I dont use it. But this InfoPopup is not part of flex 2.5, right? How you said its an old element. Nevertheless I'll try to include it in modules list and see what happens.
Soon I'll post the result.

thanks
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jefferson,

   Well many people make the same mistake, that they can comment out something that they believe is not important because they don't think they are using it. Even though I mentioned that the InfoPopup is old (maybe not the appropriate wording) . It is really still very much used if the widget builder chooses to use it instead of the newer popup. Lesson to learn from this is leave everything that the widget builder had in the XML and only replace what is necessary to use your data and get the widget working then one by one eliminate things that you believe that are not needed.
0 Kudos
AngieAllison
Emerging Contributor
i still do not have the date issue resolved.  this UTC?  it is showing the day before in this widget and all other widgets are fine with this string added
         <field name="INSTALLDATE" dateformat="MM/DD/YYYY" useutc="true"/>
0 Kudos
RhettZufelt
MVP Notable Contributor
I didn't see anywhere that the date format was being passed from the xml to the swf so I had to add it to get the format to take affect with the selection widget.

Interesting about the day off.  If I use the selection widget OR just click on a feature that I have a popupconfig for, the date is one day behind what is in the actual data.
Also, if the data is null, it reports 12/31/1969.

However, Roberts eSearchWidget reports the correct date.

R_
0 Kudos
AngieAllison
Emerging Contributor
that is what i have going on as well.  how do i fix this??  something with utc date. and the export still has that long number as the date??
0 Kudos
RhettZufelt
MVP Notable Contributor
OK, I had a type in my useutc="true" option in my popupconfig.xml, so now the built in popups report the correct date as well as the esearch widget.

Got the format of the date in selectionwidget, but it is still 1 day behind and the export shows the long date.  Will let you know if I find a solution.

R_
0 Kudos