Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part II

136658
552
04-19-2012 08:03 AM
RobertScheitlin__GISP
MVP Emeritus
All,

   I am pleased to announce the next release of my eSearch Widget.

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e

Version 2.5.1.7 - 4/19/2012
* Added ability to search (flat/standalone/no geometry) tables.
* This time all Zooming uses the same scaling (popup, datagrid, widget results, zoom to all).
* Added Relates icon/button to datagrids so that you can click on it in the datagrid to
  open relates choice dialog.
* Move all skins to a skins package for cleaner organization.
* Links that are not associated with a field now work.
* Ability to disable the relates tab in the fixed widget is now configurable.
552 Replies
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   These issue are now on the list to be addressed.
0 Kudos
BrianKraus
Occasional Contributor
Robert,

I've followed your widgets and work for some time now, but have only just now dived into using them in my application.  First off, very excellent work on everything you've done.  I realize my answer might be in the forums already, but I thought I would ask first then beg forgiveness/search for it second (I have a few tight time constraints).  I may have a few questions, but I'll start easy first.

The functionality you've recently included - the ability to select multiple features prior to executing the search - is very helpful.  One of my applications goals is simple: I need to be able to select multiple counties (grabbing their name and FIPS) and send that selection of counties off to a python simulation code I have developed elsewhere.  My first question is, how can I keep an initial set of search results that a user might generate, if that user should need to add more selections after the first set is collected?  For example:  I can select 'graphical search' interface, choose 'point selection', and 'enable multi-part graphics'; then place a few points in county centers, then click the 'search' button.  The results are displayed on the map and on the 'results' page of the widget.  With the selections still highlighted, I can place some more selection points in new counties. However, if I now go back to the 'graphical search' interface page to re-click the search button, the original selection is cleared and replaced with the new counties I selected.  What I am curious to know if the widget can be modified to do is to continuously add my new selections to (what I presume is) the ArrayCollection until at some point I'm done.  I plan on letting users choose a state to zoom to and then choose their counties, then allow them to zoom to another state and continue the process until they have the counties they need.

I'll continue reading through the documentation tomorrow as perhaps the answer is in there, but again, I thought I'd toss it out and see if the strength of the forum can help.  I'll have a few more questions after this, but I thought I would start slow first. (EDIT: I have looked at the clear() function and notice a lot of things can get erased from in there and don't know if that is the culprit or not)

Thanks and regards,
Brian K.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Brian,

   Currently the eSearch Widget does not support "Add to current selection". It would be possible to add this functionality but my schedule right now is not where I have the time to look into this enough to even give advice on code changes. I can tell you that the Selection Widget from Mark does this already. You could use this or just glean code from his widget.

http://www.arcgis.com/home/item.html?id=20ed6af9ab204548bbf092d51b51fef8
0 Kudos
BrianKraus
Occasional Contributor
Thanks Robert.

I had been tooling around with that widget, but apparently had completely missed that 'options' page.  I think I might be able to utilize his code merged with some of yours to make things work.

I have a second, naive-like question, that while not directly related to your widget, I hope you or someone can point my in the right direction.

Since your selection method (and original Search widget too) stores selection information into objects stored within an ArrayCollection, my dumb question is - how do I pull information out of that ArrayCollection?  I understand it is a container holding multiple objects that have been constructed of the selection information.  In my example it would just be the name and FIPS of a county.  But for the life of me I'm having the hardest time pulling out that information to create a list of strings ("county1","county2",etc) to use as input for my simulation code.  Is this as simple as a for-loop like iteration to go through each object in the collection?  I'll repost this question elsewhere too, but I thought I'd start here.

Brian
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Brian,

   The searchResultAC var that my widget maintains is an ArrayCollection of SearchResult objects. So each object in the ArrayCollection is a SearchResult object and thus has properties like title, icon, content, zoompercent, zoomscale, point, links, graphic, selected, oid, multi, relateicon, relates, and relatetooltip. So the problem for you is going to be that the field values that you are looking for are likely to be concatenated into one string in the content property. It would be possible to split that string by the string "<br>" and that would get you an array of strings that look like this "<b>County: </b><i>Calhoun</i>" Than you would have to use flex commands like substring to get just what is between the "<i>" and the "</i>".
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
next version 3.0.14 is now available.

Version 3.0.14 - 11/14/2012
* Fixed bug where if more than one uniquevalsfromfield was used in an expression
  Only one would populate the dropdown.
* uniquevalsfromfield now are aware of isrequired attribute and add a blank entry
  in the drop down if necessary.
* Added delay for mouseover in datagrids to allow user to exit datagrid and choose
  a button from the popup
* The popup shown from the search results and datagrid is the same popup that gets
  displayed when you click on the search graphic on the map.
* Added the ability to add and remove from current selection as well as create a new
  selection (which is the default).
* Fix bug where individual layers symbology specified in the eSearchWidget.xml was
  not being used with certain spatial searches.
* Added support for disabling search widget results (just use <disablebuttons>result</disablebuttons>).
* Added support for disabling popups completely for this widget.
0 Kudos
AnthonyGiles
Honored Contributor
Robert,

Am I missing something I can't see any option to add to or remove from selection on your sample,

Regards

Anthony
0 Kudos
RhettZufelt
MVP Notable Contributor
From the sample site:

[ATTACH=CONFIG]19292[/ATTACH]

R_
0 Kudos
AnthonyGiles
Honored Contributor
R_

Thanks for that, for some reason even after I deleted my browser history, closed and re-opened the browser, deleted the flash local storage it still would not show the update.

I had to do a shut down restart of my laptop before the changes came through.

Not experienced that before but all good now

Regards

Anthony
0 Kudos
RhettZufelt
MVP Notable Contributor
Good to hear.

I haven't had to go through the shutdown/reboot computer since I got away from the web.ADF format :o)

R_
0 Kudos