com.esri.adf.web.ags.data.edit.action
Class UpdateAttribute

java.lang.Object
  extended by com.esri.adf.web.ags.data.edit.EditAction
      extended by com.esri.adf.web.ags.data.edit.action.UpdateAttribute
All Implemented Interfaces:
Serializable

public class UpdateAttribute
extends EditAction

Updates the given attribute.

 while ((feature = c.nextFeature()) != null) {
   atts1 = EditUtil.getAttributes(layer.getValue(), feature);
   for (Attribute att : atts1.values()) {
 
     // only update dirty ones.
     if (att.isDirty()) {
       UpdateAttribute updateAttribute = new UpdateAttribute(feature, att);
       workspace.perform(context, updateAttribute);
     }
   }
 }
 
 
The feature may fire the following events:
  • PreFeatureStoreEvent
  • FeatureChangedEvent
  • See Also:
    Serialized Form

    Field Summary
     
    Fields inherited from class com.esri.adf.web.ags.data.edit.EditAction
    eventListeners
     
    Constructor Summary
    UpdateAttribute(com.esri.arcgis.geodatabase.IFeature feature, Attribute attribute)
              Instantiates an object of UpdateAttribute.
     
    Method Summary
     void action(ActionContext context)
              Performs the action.
     Attribute getAttribute()
              Gets the attribute to update.
     DateFormat getDateFormat()
              Gets the date format for date converting.
     com.esri.arcgis.geodatabase.IFeature getFeature()
              Gets the feature to update.
     void setAttribute(Attribute attribute)
              Sets the attribute to update.
     void setDateFormat(DateFormat dateFormat)
              Sets the date format for date converting.
     void setFeature(com.esri.arcgis.geodatabase.IFeature feature)
              Sets the feature to update.
     
    Methods inherited from class com.esri.adf.web.ags.data.edit.EditAction
    addEventListener, fireEvent, isEnabled, isSessionAware, removeEventListener, setEnabled, setSessionAware
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    UpdateAttribute

    public UpdateAttribute(com.esri.arcgis.geodatabase.IFeature feature,
                           Attribute attribute)
    Instantiates an object of UpdateAttribute.

    Parameters:
    feature - the feature to update
    attribute - the attribute to update
    Method Detail

    getAttribute

    public Attribute getAttribute()
    Gets the attribute to update.

    Returns:
    Returns the attribute.

    setAttribute

    public void setAttribute(Attribute attribute)
    Sets the attribute to update.

    Parameters:
    attribute - The attribute to set.

    getFeature

    public com.esri.arcgis.geodatabase.IFeature getFeature()
    Gets the feature to update.

    Returns:
    Returns the feature.

    setFeature

    public void setFeature(com.esri.arcgis.geodatabase.IFeature feature)
    Sets the feature to update.

    Parameters:
    feature - The feature to set.

    getDateFormat

    public DateFormat getDateFormat()
    Gets the date format for date converting.

    Returns:
    Returns the dateFormat.

    setDateFormat

    public void setDateFormat(DateFormat dateFormat)
    Sets the date format for date converting.

    Parameters:
    dateFormat - The dateFormat to set.

    action

    public void action(ActionContext context)
                throws Exception
    Description copied from class: EditAction
    Performs the action.

    Specified by:
    action in class EditAction
    Parameters:
    context - the action context.
    Throws:
    Exception