Select to view content in your preferred language

error when adding custom widget.

628
1
06-22-2010 10:42 AM
grahamcooke
Regular Contributor
I got the "Attempting to initialise non-public inherited property widgetTemplate" error when developing a widget iaw the instructions in the developers guide for the sample flex viewer.

i followed all the advice in this thread: http://forums.esri.com/Thread.asp?c=158&f=2421&t=269385 and found that when I mispell the id the error goes away. However my widget does not maximise when clicked and the wait cursor displays from the second my flex app loads.

My widget code looks like this:
<BaseWidget xmlns="com.esri.solutions.flexviewer.*" xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
<WidgetTemplate  id="widgetTempalte"  
</WidgetTemplate>
</BaseWidget>

I have added my widget to the flex modules for compilation as per the instructions and cleaned my project and I also added a mywidget.xml config file for the widget (which is just blank).

Hope someone can help!
Tags (2)
0 Kudos
1 Reply
SreeS
by
Emerging Contributor
1. The first line of any mxml component should be

<?xml version="1.0" encoding="utf-8"?>

2. If you want to use the default template of the Sample Flex Viewer then add this to BaseWidget:
xmlns:widgets="com.esri.solutions.flexviewer.widgets.*"

and your  WidgetTemplate should look like --> <WidgetTemplate id="wTemplate" >


For more information on developing widgets and the sample flex viewer go thru this document:

http://88.191.74.143/FlexViewerFR/FlexViewerDevelopersGuide.pdf
0 Kudos