lcatania

Graphic Attribute Methods

Discussion created by lcatania on May 7, 2012
Latest reply on May 11, 2012 by doneill-esristaff
What happened to the setAttributeValue and removeAttribute methods on the Class Graphic?  The only way I see to set attributes is to include them when instantiating the graphic.  In my app, I draw a polygon in a graphics layer and then have a popup dialog box asking the user to enter info which will populate the attributes.   So my graphic exist before having attributes.  How do I populate the attributes after I already instantiated the graphic?

I tried updateGraphic.   I used the constructor that allow you to assign an ID.  I then created another graphic with attributes and used the updateGraphic method, but itdid not work.  I found that my first graphic did did not contain the graphic ID I assigned, but some random one.  How else can I do this?

Why was setAttributeValue and removeAttribute methods removed?  Seems to make sense to be able to have such methods.

Outcomes