Select to view content in your preferred language

MiniSearch widget doesnt work execSearch()

4298
44
07-05-2010 05:40 AM
NatashaManzuiga
Regular Contributor
http://forums.esri.com/Thread.asp?c=158&f=2421&t=295623#953276

I have the same problem...execSearch()..in MiniSearch widget.
If I add a search term and press Return nothing happens. I also added a button to the widget with the "execSearch()" statement and nothing happens with this either.

Thx

Naty
Tags (2)
0 Kudos
44 Replies
RobertScheitlin__GISP
MVP Emeritus
Naty,

   This is what I would change in the code:

<hc:AdvancedAutoComplete id="advancedAutoComplete" x="8" y="30" width="250"            
                                 dataProvider="{_xlcDP}"
                                 labelField="@name"             
                                 matchType="anyPart"
                                 showRemoveIcon="true"
                                 selectedItemStyleName="none"
                                 color="#000000"
                                 change="execSearch()"
                                 itemClick="{advancedAutoComplete.showBrowser()}"
                                 actionsMenuDataProvider="{autoCompleteMenuData}"
                                 browserFields="{[{label:'Building Name', field:'@name'}]}"/>
0 Kudos
NatashaManzuiga
Regular Contributor
I tried with this "color" too and it perfectly works...but my problem is that when I open the dropdown the selected item has the same color of the Font 😄 so I cant see what I'm selecting 😛
Thanks Robert!!
Naty

Naty,

   This is what I would change in the code:

<hc:AdvancedAutoComplete id="advancedAutoComplete" x="8" y="30" width="250"            
                                 dataProvider="{_xlcDP}"
                                 labelField="@name"             
                                 matchType="anyPart"
                                 showRemoveIcon="true"
                                 selectedItemStyleName="none"
                                 color="#000000"
                                 change="execSearch()"
                                 itemClick="{advancedAutoComplete.showBrowser()}"
                                 actionsMenuDataProvider="{autoCompleteMenuData}"
                                 browserFields="{[{label:'Building Name', field:'@name'}]}"/>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Naty,

   I ran into this before and was not able to change the background color in the autocomplete component. So sorry my best advice is to change your text color for the whole Flex Viewer.
0 Kudos
DavideRodomonti
Emerging Contributor
Naty,

   I ran into this before and was not able to change the background color in the autocomplete component. So sorry my best advice is to change your text color for the whole Flex Viewer.


Robert and Naty, let's try to set styles "rollOverColor" and "selectionColor".

Davide
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Naty,

   Davide pointed me in the right direction here is the new init function.

private function init():void
            {
                if(configXML)
                {
                    searchTip = configXML.textsearchtip;
                    advancedAutoComplete.toolTip = searchTip;
                }
                _xlcDP = new XMLListCollection(dp.Building);
                advancedAutoComplete.setStyle("textRollOverColor",0x000000);
                advancedAutoComplete.setStyle("textSelectedColor",0x000000);
            }
0 Kudos