Select to view content in your preferred language

Attribute widget on top

2444
5
12-18-2012 03:16 PM
RhettZufelt
MVP Notable Contributor
I am trying to utilize the attribute widget, and when open, it opens over the top of all other widgets.

Is is possible to control which widgets it covers vs. draws under?

Thanks,

R_
Tags (2)
0 Kudos
5 Replies
HeatherGonzago
Esri Contributor
The widgetcontainer tag has attributes such as size, paneltype, and initialstate that you can configure.

E.g.
<widgetcontainer 
paneltype="bottom" initialstate="open" height="250">
<widget label="Attribute Table" config="widgets/AttributeTable/AttributeTableWidget.xml" 
url="widgets/AttributeTable/AttributeTableWidget.swf"/>
</widgetcontainer>


The paneltype allows bottom, left, or right.

Not doc'd, but you can also add the widget into a widgetcontainer similar to how your other widgets display.

 <widget label="attributes" left="430" top="90"
                icon="assets/images/i_table.png"
                config="widgets/AttributeTable/AttributeTableWidget.xml"
                url="widgets/AttributeTable/AttributeTableWidget.swf" />


Just like any of the other widgets, you can specify the layout of how the widgets will display relative to the application. http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Widget_Container_tag/01m3000000...
http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Widget_tag/01m30000001w000000/
0 Kudos
RhettZufelt
MVP Notable Contributor
Thanks for the information.  However, it doesn't matter how I load it, it still opens above all other widget windows.  even if I open a widget afterwards, it puts it below the attribute table so it can't be seen.

I am trying to figure out how to make it open behind other widgets.

R_
0 Kudos
SarthakDatt
Frequent Contributor
Hey,

I just updated the default.xml to add the Attribute Table widget(not inside a separate widget container) and it behaves like any other widget. In the following screenshot, i opened the AT widget first followed by the GeoRSS widget, the GeoRSS widget is on top:

[ATTACH=CONFIG]20074[/ATTACH]

Here's the excerpt from config.xml:

<widgetcontainer layout="float">
        <widget label="Bookmarks"   left="430" top="90"
                icon="assets/images/i_bookmark.png"
                config="widgets/Bookmark/BookmarkWidget.xml"
                url="widgets/Bookmark/BookmarkWidget.swf"/>
        <widget label="Louisville Police" left="590" top="280"
                icon="assets/images/i_police.png"
                config="widgets/Query/QueryWidget_Louisville_PoliceStations.xml"
                url="widgets/Query/QueryWidget.swf"/>
        <widget label="Search" left="80" top="280"
                icon="assets/images/i_search.png"
                config="widgets/Search/SearchWidget_Louisville.xml"
                url="widgets/Search/SearchWidget.swf"/>
        <widget label="Earthquakes (GeoRSS)" left="410" top="280"
                icon="assets/images/i_rss.png"
                config="widgets/GeoRSS/GeoRSSWidget.xml"
                url="widgets/GeoRSS/GeoRSSWidget.swf"/>
        <widget label="Draw" left="60" top="400"
                icon="assets/images/i_draw2.png"
                config="widgets/Draw/DrawWidget.xml"
                url="widgets/Draw/DrawWidget.swf"/>
        <widget label="Print" left="390" top="400"
                icon="assets/images/i_print.png"
                config="widgets/Print/PrintWidget.xml"
                url="widgets/Print/PrintWidget.swf"/>
        <widget label="AttributeTable" left="390" top="400"                
                config="widgets/AttributeTable/AttributeTableWidget.xml"
                url="widgets/AttributeTable/AttributeTableWidget.swf"/>
    </widgetcontainer>


Also, clicking on the header of a widget, should bring focus(move it to top).
0 Kudos
RhettZufelt
MVP Notable Contributor
Thanks Sarthak,

Taking your idea and playing with it some I see that the widgets can be moved above when open or by clicking the widget window IF that widget was in a widgetcontainer that opened after the other widgets.  So, if I move the attribute table to a widgetcontainer that loads first, all other widgets can be moved above/below by clicking.

However, I do like the "docked" to the bottom of the page option, and still see no way to make that "table" do anything but overlap on top of everything else.

R_
0 Kudos
SarthakDatt
Frequent Contributor
Yes, I can see how it can be an issue sometimes. If you make the 'docked' AT widget large enough either by dragging the orange panel bar or at startup. I tried the default config.xml again and looks like you can work around the issue(its an issue if the layout of the first widget container is 'float') by positioning your widgets:

[ATTACH=CONFIG]20080[/ATTACH]

config.xml:

<widgetcontainer layout="float">
        <widget label="Bookmarks"         left="430" top="90"
                icon="assets/images/i_bookmark.png"
                config="widgets/Bookmark/BookmarkWidget.xml"
                url="widgets/Bookmark/BookmarkWidget.swf"/>
        <widget label="Louisville Police" left="590" top="280"
                icon="assets/images/i_police.png"
                config="widgets/Query/QueryWidget_Louisville_PoliceStations.xml"
                url="widgets/Query/QueryWidget.swf"/>
        <widget label="Search" left="80" top="280"
                icon="assets/images/i_search.png"
                config="widgets/Search/SearchWidget_Louisville.xml"
                url="widgets/Search/SearchWidget.swf"/>
        <widget label="Earthquakes (GeoRSS)" left="410" top="280"
                icon="assets/images/i_rss.png"
                config="widgets/GeoRSS/GeoRSSWidget.xml"
                url="widgets/GeoRSS/GeoRSSWidget.swf"/>
        <widget label="Draw" left="60" top="400"
                icon="assets/images/i_draw2.png"
                config="widgets/Draw/DrawWidget.xml"
                url="widgets/Draw/DrawWidget.swf"/>
        <widget label="Print" left="390" top="400"
                icon="assets/images/i_print.png"
                config="widgets/Print/PrintWidget.xml"
                url="widgets/Print/PrintWidget.swf"/>
        <!--
        <widget label="My first widget"
                icon="assets/images/i_widget.png"
                config="widgets/Samples/HelloWorld/HelloWorldWidget.xml"
                url="widgets/Samples/HelloWorld/HelloWorldWidget.swf"/>
        -->
    </widgetcontainer>
    <widgetcontainer paneltype="bottom" initialstate="collapsed" height="250">
            <widget label="Attribute Table"
                config="widgets/AttributeTable/AttributeTableWidget.xml"
                url="widgets/AttributeTable/AttributeTableWidget.swf"/>
    </widgetcontainer>


This is using the default config-all.xml (horizontal layout):
[ATTACH=CONFIG]20079[/ATTACH]
0 Kudos