Select to view content in your preferred language

Search Widget error Flex 2.4

966
3
08-29-2011 05:22 AM
StephenThornton
Deactivated User
Hi All,

I've customized the search widget to use a drop down list of values instead of the the text entry that comes out of the box. I hit search and the results appear on the map and in the search results grid but when I hover over a result I receive the following error:

ArgumentError: Error #2004: One of the parameters is invalid.
at ObjectOutput/writeObject()
at mx.collections::ArrayList/writeExternal()
at mx.collections::ArrayCollection/writeExternal()
at flash.utils::ByteArray/writeObject()
at mx.utils::ObjectUtil$/copy()
at com.esri.ags.webmap::PopUpRenderer/commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/validateProperties()
at mx.managers::LayoutManager/doPhasedInstantiation()
at mx.managers::LayoutManager/doPhasedInstantiationCallback()

Has anyone encountered this before? Any ideas?

Many Thanks,

Steve
Tags (2)
0 Kudos
3 Replies
JayBoyd
Deactivated User
Hi Steve,

I just encountered the same issue. Were you able to identify the cause?

Thank you,
Jay
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
You guys are posting to the wrong forum as this is a flex viewer/widget question and should be in the flex viewer forum.

http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex

But have you not seen the Enhanced Search widget that handles exactly what you are trying to do plus a boat load more features:

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e
0 Kudos
JayBoyd
Deactivated User
Hi Robert,

Thank you for the link to the Enhanced Search widget. Unfortunately, the search function is just one piece of functionality that I needed in the widget I am creating. The other functional requirements were a call to a WCF service and a feature creation workflow  both of which were very specific to the application (and already complete).

I did discover that the exception was related to the WCF service declaration in my .mxml page. I had originally declared an instance of the service inside of the <fx:Declarations></fx:Declarations> tags as I had seen in several examples.When I changed the approach to declare an instance of the service inside of a function in the script portion of my widget I no longer encountered the exception.

Unless the exception is related to the scope of variable that holds my service instance, I am not sure why this is fixing my problem. In any case, it seems to be working well now so I will continue with this approach.

Thank you,
Jay
0 Kudos