Marcos, I'm not sure I understand. Could you explain in more details?
It might be better to do this in a new discussion thread (instead of re-using this one from last year). Go to ArcGIS Viewer for Flex and click "Actions -> Create -> Discussion".
the error was partially corrected. Existing feature and dynamic, the AT show only the feature
Yes, make sure the dynamic map service has visible=true. The AT widget will only add tabs for visible layers(applies for feature layers as well) In the sample config I posted you can change visible=true on PoolPermits to see AT widget including the feature layers.The way configuring AT widget in AppBuilder works is that by default it shows you all the possible layers the widget would add, by unchecking the checkboxes it would actually write out <excludelayer> tag to the widget config. At 3.1 we added a way where you can exclude layers within mapservice as well: <excludelayer>mapservicename/sublayerid<excludelayer>
Actually, it's not a question about SDE or not. It's a question about whether you publish the MapService as a Feature Service (in addition to MapService).
Yes, it still only works on Feature Server services which need SDE.
The issue where a dynamic mapservice sourced from a file geodatabase does not show up in this widget still appears to exist with the Flex 3.2 Build.Can anyone else confirm this to be the case?If this is the case, does ESRI plan to modify this widget so a dynamic mapservice sourced from a file geodatabase works with this widget?
Unfortunately the only work around right now is to customize the widget to take care of this use case or to specifically add feature layers in the config(which you are already doing).We will discuss within the team about supporting this scenario in out-of-the-box widget for the next release.
Ok, the only way I can get it to work for a dynamic service is to publish a feature service (enable the feature access capability in the map service) as well, so it appears this is a requirement for this to work?
<layer type="feature" url="MapService/layerId-1"/> <layer type="feature" url="MapService/layerId-2"/>
So, is there something special about the ESRI service(s) you listed below, as both of them will show up in the attribute table. Of course, the way you coded it visible="false", one has to actually click the checkbox to turn it on. The first time I turn on the dynamic layer I get this error (twice): TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.esri.ags.components::AttributeTable/updateGraphicCollection() at com.esri.ags.components::AttributeTable/checkForVisibilityAndScale() at com.esri.ags.components::AttributeTable/refresh() at widgets.AttributeTable::AttributeTableWidget/featureLayer_hideShowHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.core::UIComponent/setVisible() at mx.core::UIComponent/set visible() at com.esri.ags.layers::Layer/set visible() at widgets.AttributeTable::AttributeTableWidget/updateFeatureLayersVisibility() at widgets.AttributeTable::AttributeTableWidget/layer_hideShowHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.core::UIComponent/setVisible() at mx.core::UIComponent/set visible() at com.esri.ags.layers::Layer/set visible() at com.esri.viewer.components.toc.tocClasses::TocMapLayerItem/refreshLayer() at com.esri.viewer.components.toc.tocClasses::TocItem/setVisible() at com.esri.viewer.components.toc.tocClasses::TocItem/set visible() at com.esri.viewer.components.toc.tocClasses::TocItemRenderer/onCheckBoxClick() after dismissing/continuing past the error, it seems to load/unload the attributes as you check/un-check the checkbox (as expected) so it appears to actually honor the visible="" from the checkbox. If I uncheck a layer, it's tab is removed from the attribute table. If I load as visible="true", then I never get the error, no matter how many times I check/uncheck the box. With the type="feature" layer, I never get the error, no matter if visible on load or not.
TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.esri.ags.components::AttributeTable/updateGraphicCollection() at com.esri.ags.components::AttributeTable/checkForVisibilityAndScale() at com.esri.ags.components::AttributeTable/refresh() at widgets.AttributeTable::AttributeTableWidget/featureLayer_hideShowHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.core::UIComponent/setVisible() at mx.core::UIComponent/set visible() at com.esri.ags.layers::Layer/set visible() at widgets.AttributeTable::AttributeTableWidget/updateFeatureLayersVisibility() at widgets.AttributeTable::AttributeTableWidget/layer_hideShowHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.core::UIComponent/setVisible() at mx.core::UIComponent/set visible() at com.esri.ags.layers::Layer/set visible() at com.esri.viewer.components.toc.tocClasses::TocMapLayerItem/refreshLayer() at com.esri.viewer.components.toc.tocClasses::TocItem/setVisible() at com.esri.viewer.components.toc.tocClasses::TocItem/set visible() at com.esri.viewer.components.toc.tocClasses::TocItemRenderer/onCheckBoxClick()
// AttributeTable(featureLayerToAttributeTable[featureLayer]).refresh();
However, no matter how I load my services, I only see the attributes if I load them as type="feature", and will NOT show any attributes from a dynamic service. <operationallayers> <layer label="311" type="feature" visible="false" alpha="1.0" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0"/> <layer label="PoolPermits" type="dynamic" visible="true" alpha="1.0" url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/PoolPermits/MapServer"/> <layer label="WasteSites" type="dynamic" visible="true" alpha="1" url="http://gis01.wch-rcc.com/ArcGIS/rest/services/Base/All_Waste_Sites2/MapServer"/> <layer label="MRTest" type="feature" visible="true" alpha="0.5" url="http://gis01.wch-rcc.com/ArcGIS/rest/services/rkz/mrtest/MapServer/0"/> </operationallayers> In this example the MRTest attributes populate the grid, WasteSites just seems to be ignored (no tab, no data, nothing). Same thing if I load the MRTest as dynamic. Unfortunatly, my service is not public, but here is how I have it loaded. Do you see anything I am missing? This is a AGS 10.05 service, and have also tried with 10.11 service, but no joy. Any ideas? R_
<operationallayers> <layer label="311" type="feature" visible="false" alpha="1.0" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0"/> <layer label="PoolPermits" type="dynamic" visible="true" alpha="1.0" url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/PoolPermits/MapServer"/> <layer label="WasteSites" type="dynamic" visible="true" alpha="1" url="http://gis01.wch-rcc.com/ArcGIS/rest/services/Base/All_Waste_Sites2/MapServer"/> <layer label="MRTest" type="feature" visible="true" alpha="0.5" url="http://gis01.wch-rcc.com/ArcGIS/rest/services/rkz/mrtest/MapServer/0"/> </operationallayers>
Is this really true? I can see the attributes from any service loaded as type="feature", but I see no attribute information at all with any of the type="dynamic" mapservices using the default attributetablewidget.xml.The only example in the documentaion is for AppBuilder and it has a screenshot allowing you to select which layers to show in the attribute table. Is this actually modifying the xml to show sublayers, or is the AttributeWidget actually supposed to show them all by default like it does with type="feature"?Thanks,R_
Hey Shaun,Just to clarify a bit more, the AttributeTable widget allows you to:a) work with layers added to the map (for feature layers, it directly adds them, for a map service it goes in an find the corresponding featurelayers and adds them)e.g: <operationallayers> <layer label="311" type="feature" visible="false" alpha="1.0" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0"/> <layer label="PoolPermits" type="dynamic" visible="false" alpha="1.0" url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/PoolPermits/MapServer"/> </operationallayers> Would add 311 layer and corresponding feature layers(2) from PoolPermits map service. You dont have to do anything in the widget's config for this.
<operationallayers> <layer label="311" type="feature" visible="false" alpha="1.0" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0"/> <layer label="PoolPermits" type="dynamic" visible="false" alpha="1.0" url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/PoolPermits/MapServer"/> </operationallayers>
<layer label="Military_Units" url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/FeatureServer/2">
It works and show all features, but doesn't update when you pan to a new extent
Stuggling to get this new widget to work. I'm finding if I specify in the config something like this:<layer label="Boundaries" url="http://testserver/arcgis/rest/services/Boundaries/Boundaries/MapServer/0"></layer> <!-- non-mapped layer(s), added for just this widget -->It works and show all features, but doesn't update when you pan to a new extent and if I set the config like this: <layersettings> <layer name="Boundaries"> <!-- Overwriting layer settings for a map service layer --> <sublayer id="0" iseditable="false"> <!-- is editable only supported for a sub layer within a map service layer --> <fields> <field name="objectid" alias="ObjectID"/> </fields> <showobjectid>false</showobjectid> <showglobalid>false</showglobalid> <exportlocation>true</exportlocation> <showattachments>false</showattachments> <showrelatedrecords>false</showrelatedrecords> <columnsorder>alphabetical</columnsorder> </sublayer> </layer> </layersettings> The above references a map service like this in my main config file: <layer label="Boundaries" type="dynamic" visible="false" alpha="1.0" url="http://testserver/arcgis/rest/services/Boundaries/Boundaries/MapServer"/>It doesn't work at all. What am I doing wrong and how can I set this attribute table to work with map services I have defined in the main config file?
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.