Select to view content in your preferred language

Config.XML: Widget Height and Width Elements Randomly Defaulting

696
6
04-18-2013 10:34 AM
NicholasMcNamara
Frequent Contributor
Over the past few months, I've manually setting the height and width attributes for the eSearch widget in my Config.XML and they just disappear at some point - the attribute tags just disappear, and the window defaults to its original size, which is too small and I get a scroll bar.

Here's my entire widget container. I just added back in (for the 5th time or so), the height and width for the eSearch widget. I'm not sure what is making this reset. Any clues?

<widgetcontainer layout="float"><widget url="widgets/eSearch/eSearchWidget.swf" config="widgets/eSearch/eSearchWidget_1.xml" label="Search" icon="assets/images/i_search.png" preload="open" left="80" top="82" height="280" width="380" /><widget url="widgets/Identify/IdentifyWidget.swf" config="widgets/Identify/IdentifyWidget_1.xml" label="Identify" icon="widgets/Identify/assets/images/i_info.png" left="80" top="82" /><widget url="widgets/Draw/DrawWidget.swf" config="widgets/Draw/DrawWidget.xml" label="Draw and Measure" icon="assets/images/i_draw2.png" left="80" top="125" /><widget url="widgets/Edit/EditWidget.swf" config="widgets/Edit/EditWidget_1.xml" label="Redline" icon="assets/images/i_edit.png" /><widget url="widgets/Bookmark/BookmarkWidget.swf" config="widgets/Bookmark/BookmarkWidget_1.xml" label="Bookmark" icon="assets/images/i_bookmark.png" /><widget url="widgets/TOC/TOCWidget.swf" config="widgets/TOC/TOCWidget_1.xml" label="Layer List" icon="assets/images/i_layers.png" left="80" top="175" /><widget url="widgets/Print/PrintWidget.swf" config="widgets/Print/PrintWidget.xml" label="Print" icon="assets/images/i_print.png" /></widgetcontainer>
Tags (2)
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
Nick,

   Are you making changes in App Builder to the eSearchWidget.xml or any other widgets xml?
0 Kudos
NicholasMcNamara
Frequent Contributor
I make changes usually in the XML, but sometimes using the App Builder, depending on what it is. Are you inferring that making any changes using the App Builder will reset the config.xml?
0 Kudos
NicholasMcNamara
Frequent Contributor
Oh, I misread that. No, I do not make changes to the XML using the App Builder. I use a program called XML Notepad and make the changes directly to the files with that. I'm referring to the main Config.xml file in the widget container, here.
Thank You.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nick,

   Short of you using an old version of the xml accidentally I have no idea why this would happen then.
0 Kudos
ScottMcGee
Regular Contributor
I too have experienced this issue, with Flex 3.1 and Flex 3.2. In my case, I've definitely identified the culprit as the Application Builder. I normally edit my config.xml and widget xml files in a text editor, outside of the Application Builder. But occasionally I do something in the App Builder, such as add a custom widget to my project, or add or remove operational layers, and then click the Save button to save my changes. Immediately after saving changes in the App Builder, I open my config.xml in a text editor and I notice that the <height>, <witdth>, and <preload> tags for some (not all) of my widgets have been either removed or replaced with default values. In particular, this frequently happens to my TOC, Print, and Navigation widgets.

This happens so often that I have taken to saving backup copies of my <widget> tags in my config.xml file (the backed-up tags are commented out with <!--    --> so that they don't interfere with the normal operation of the web map). The backed-up tags don't get altered when I do something in the App Builder, so that way I can easily recover my custom <width>, <height>, and <preload> tags when the App Builder sets them to the default.

But I have no idea why the App Builder is resetting some widgets to default values for <width, and <height>.
0 Kudos
NicholasMcNamara
Frequent Contributor
Well, it looks like it's a bug then. Thanks for the verification.
0 Kudos