Revision 45162 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretable/SimpleFeaturesTableModel.java

View differences:

SimpleFeaturesTableModel.java
120 120
            if (this.featureType == null) {
121 121
                return String.class;
122 122
            }
123
            try {
123 124
            String attrName = this.columnNames.get(columnIndex);
124 125
            FeatureAttributeDescriptor attrdesc = this.featureType.getAttributeDescriptor(attrName);
125 126
            if (attrdesc == null) {
......
139 140
                return String.class;
140 141
            }
141 142
            return theClass;
143
            } catch (Exception ex) {
144
                return String.class;
145
            }
142 146
        }
143 147

  
144 148
        @Override
......
164 168
                Feature feature = this.features.get(rowIndex);
165 169
                String attrName = this.columnNames.get(columnIndex);
166 170
                Object value = null;
171
                value = feature.get(attrName);
167 172
                FeatureAttributeDescriptor attrdesc = this.featureType.getAttributeDescriptor(attrName);
168
                if (attrdesc ==null) {
169
                    int extraIndex = featureType.getExtraColumns().getIndexOf(attrName);
170
                    if (extraIndex != -1) {
171
                        attrdesc = featureType.getExtraColumns().get(extraIndex);
172
                    }
173
                    value = feature.getExtraValue(attrName);
174
                } else {
175
                    value = feature.get(attrName);
176
                }
177 173
                if (attrdesc != null) {
178 174
                    if( attrdesc.isForeingKey() && attrdesc.getForeingKey().isClosedList() ) {
179 175
                        value = attrdesc.getForeingKey().getLabelForValue(value);

Also available in: Unified diff