AnsweredAssumed Answered

Edit available types in attribute inspector controls?

Question asked by geodan7 on Apr 4, 2012
Latest reply on Apr 6, 2012 by geodan7
Hi all,

I have an editing application that points to a few feature layers. These feature layers have 100 symbols (value renderer) in the MXD. These get carried over automatically in the javascript api application...and I'm able to change the attribute and the map refreshes and changes the symbology. That's all good.

But...I want to restrict how many of those 100 symbols are available in the select box in the attribute inspector/info window. The map's definition expression on the feature layers doesn't seem to carry over to the available values in the attribute thought I would try to hack the attribute inspector and remove all options except the ones each particular user is allowed to use.

Anyone have thoughts on this? Seems easy-ish, but i'm new to the javascript API...and obviously I'd rather not hack things, but after all the searching around...and creating my own infoWindow...this still seems like the most least-intrusive way to go about it (cuz when I roll my own attribute inspector...much of the auto-wiring that is setup...gets broken).

In the code below, I can see in the debugger each available value for each type...but not sure how to remove them safely.

var myEditor = new esri.dijit.editing.Editor(params, 'editorDiv');             myEditor.startup();              var attInspector = myEditor.attributeInspector;             var layerInfos = attInspector.layerInfos;             var pointTypes = layerInfos[0].types;