Widgets - Undefined state 'open'. ERROR

2296
13
09-01-2010 04:24 AM
Kevin_RogersBwire
New Contributor
Flex Team,

I am getting a problem whenever I insert a widget e.g the searchwidget into my custom adobe flex web map applications. After runnning itm I get the following error

ArgumentError: Undefined state 'open'.
at mx.core::UIComponent/getState()
at mx.core::UIComponent/findCommonBaseState()
at mx.core::UIComponent/commitCurrentState()
at mx.core::UIComponent/commitProperties()
at spark.components.supportClasses::GroupBase/commitProperties()
at spark.components::Group/commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/validateProperties()
at mx.managers::LayoutManager/doPhasedInstantiation()
at mx.managers::LayoutManager/doPhasedInstantiationCallback()

What is the cause?
Tags (2)
0 Kudos
13 Replies
RobertScheitlin__GISP
MVP Emeritus
Kevin,

     When you say
my custom adobe flex web map
do you mean that it is not the sample flex viewer 1.x or the FlexViewer2.0? If so than you have a real issue as the search widget is dependent on the viewers framework and you can not just add it to a custom flex app. There are a couple of non SFV versions of widgets out there here is a link to the non-SFV searchWidget.

http://www.arcgis.com/home/item.html?id=2d2ccae108b74b1ba8968e21c730bdb4
0 Kudos
Ganael_Jatteau
New Contributor II
After upgrading the Esri flexviewer from 2.0 beta to 2.1, I have the same issue. When a widget gets loaded, I get the same error: Widgets - Undefined state 'open'. ERROR

Debugging the application, I found that widget templates have two states: disabled and normal

I'm investigating... Maybe a compiler argument to add...

Ganael
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ganael,

   Hmm.... the 2.1 Version WidgetTemplate has

[SkinState("open")]
[SkinState("minimized")]
[SkinState("closed")]


Are you missing this?
0 Kudos
yangyi
by
New Contributor
�?位�?�??�?碰�?��?个�?��?�?不�?��?�?个�?��?�??没�??解�?��?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Snyod,

   確保你�??�??�?�??家�?��?��??Widget模板

[SkinState("open")]
[SkinState("minimized")]
[SkinState("closed")
0 Kudos
yangyi
by
New Contributor
Snyod,

   確保你�??�??�?�??家�?��?��??Widget模板

[SkinState("open")]
[SkinState("minimized")]
[SkinState("closed")


�?常�??谢rscheitlin
�?�WidgetTemplate.as�??件�??�??�?�?�?
[Event(name="open", type="flash.events.Event")]
[Event(name="minimized", type="flash.events.Event")]
[Event(name="closed", type="flash.events.Event")]

[SkinState("open")]
[SkinState("minimized")]
[SkinState("closed")]

public class WidgetTemplate extends SkinnableContainer implements IWidgetTemplate
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
�?�使�?��??�?��?�??已編譯�??�?件�?�??�??�?��??�?�?��?
你�?�?�?�??�??乾淨�??�?�?�?��?�?��??�?
0 Kudos
yangyi
by
New Contributor
�??�??�?��?��?个index.mxml �?� src �?��?�?
�?��?�?��?�建�?个index.mxml�?? �?�运�?�?序就�?ArgumentError: Undefined state 'open'.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Yang,


尝�?�?��?��??bin- debug�??件夹中�??�??容�??�?��?�?项�?��?�?�?�??�?�?�?�令�??

Try deleting the contents of the bin-debug folder. Then run the clean command from the project menu.
0 Kudos