Select to view content in your preferred language

Enhanced Search Widget for FlexViewer 2.1

127984
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
Dave,

  It is as simple as:

REACH_Num = [value]


The single quotes tell the underlying data base that you are attempting to search for a string. So no single quotes means a number or something else.
0 Kudos
EricVenden
Frequent Contributor
Has anyone seen the following error:
Index '-1' specified is out of bounds.

The error seems to pop after doing several searches that are configured using multiple expressions and on a joined feature class.  I cannot reproduce this with a search on a non-joined feature class that is configured with only 1 expression.

Thanks
Eric V
0 Kudos
DavidAllen
Frequent Contributor
Dave,

  It is as simple as:

REACH_Num = [value]


The single quotes tell the underlying data base that you are attempting to search for a string. So no single quotes means a number or something else.



It's always the simple things that get you. I spent an hour yesterday trying to fix an error, and it was just a missing set of quotes. Argh!

Thanks for your help, Robert!

David Allen
0 Kudos
EricVenden
Frequent Contributor
Robert,

I've tested a bunch of scenarios on my end.  Searches on features without a join (1 or more expressions) work fine.  Searches on joined features do not sort (1 or more expressions).  I have copied the fields just as they appear in the REST service directory.   I have also tried this on numerous feature classes of differing geometry types.  The only difference between the searches that sort and the searches that do not sort properly seems to be the join.

To All:
Has anyone else experienced this behavior?

Thanks for your time
Eric
0 Kudos
JustinFultz
Regular Contributor
I have implemented the latest esearch widget.  When using a layer with domain values, a popup box comes up with text showing which value you are hovering over.  If I use the mouse wheel to scroll up and down through the options, these popup boxes remain on the screen, even after shutting down the widget. I have included an image.

Any ideas how to fix this.  If not, how can I completely turn the popup boxes off (NOTE: these aren't the info boxes, just the text boxes for domain values).

Thanks in advance!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Justin,

   I don't know why people always want things to just work right... 😄 I don't have time to fix this right now and publish a new version as there is another change I want to get into the code before I push out another version. If you are one that is using the source code the fix is simple to add other wise I will have this fixed in the new version next week.

code fix is to replace the function fnCreToolTip with this one:
   private function fnCreToolTip(e:ListEvent):void
   {
    switch(e.type)
    {
     case ListEvent.ITEM_ROLL_OVER:
     {
      try{
       ToolTipManager.destroyToolTip(myTip);
      }
      catch(error:Error){}
      //creates a tooltip.
      myTip = ToolTipManager.createToolTip(cbSearch.dataProvider[e.rowIndex].label,stage.mouseX+10,stage.mouseY) as ToolTip; // array2 is id of arraylist  
      break;
     }
     case ListEvent.ITEM_ROLL_OUT:
     {
      //destroy the created tooltip, so that we can create a new one for others.
      try{
      ToolTipManager.destroyToolTip(myTip);
      }
      catch(error:Error){}
      break;
     }
     case ListEvent.CHANGE:
     {
      //destroy the created tooltip, so that we can create a new one for others.
      ToolTipManager.destroyToolTip(myTip);
      break;
     }
    }
   }
0 Kudos
JustinFultz
Regular Contributor
Got it fixed!

Thanks, as always, for the timely response and great widgets!
0 Kudos
EricVenden
Frequent Contributor
Robert,

Just wanted to follow-up to my post from yesterday...Do you have joined feature classes that allow you to sort the search results from your eSearch widget?

Thanks for your time.
Eric V
Gurnee, IL
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Eric,


   I will have to do some test environment setup to test the possible join issue. I don't actually use this widget as is the case with most widgets I create. I spend time creating testing and fixing reported bug when I get time but, actually don't use most of them on my site. So I depend on people like you to tell me their unique use of the widgets and issues they find. I will attempt to dig into the possible join issue next week.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Eric,

    I have been able to confirm that there is an issue with sorting fields in the datagrid that have joined data. I don't currently have a resolution. If I figure out a fix it will be in a future release and will be documented that this bug is fixed.
0 Kudos