/** * Implemented method from BaseAdapter class. This method returns the actual data associated with * a row in the list. In this case we return the field along with the field value as a custom * object. We subsequently add the View which displays the value to this object so we can retrieve * it when applying edits. */ public Object getItem(int position) { // get field associated with the position from the editableFieldIndexes // array created at startup int fieldIndex = this.editableFieldIndexes[position]; AttributeItem row = null; // check to see if we have already created an attribute item if not // create // one if (items[position] == null) { // create new Attribute item for persisting the data for subsequent // events row = new AttributeItem(); row.setField(this.fields[fieldIndex]); Object value = this.featureSet.getGraphics()[0].getAttributeValue(fields[fieldIndex].getName()); row.setValue(value); items[position] = row; } else { // reuse existing item to ensure View instance is kept. row = items[position]; } return row; }