Revision 24759 branches/v2_0_0_prep/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/table/ProjectTable.java

View differences:

ProjectTable.java
42 42

  
43 43
import java.util.ArrayList;
44 44

  
45
import org.gvsig.fmap.data.ReadException;
46
import org.gvsig.fmap.data.feature.AbstractFeatureStore;
47
import org.gvsig.fmap.data.feature.FeatureStore;
48
import org.gvsig.fmap.data.feature.FeatureType;
45
import org.gvsig.fmap.dal.exception.DataException;
46
import org.gvsig.fmap.dal.exception.ReadException;
47
import org.gvsig.fmap.dal.feature.FeatureStore;
48
import org.gvsig.fmap.dal.feature.FeatureType;
49 49
import org.gvsig.fmap.mapcontext.layers.FLayer;
50 50
import org.gvsig.fmap.mapcontext.layers.FLayers;
51 51
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
52
import org.gvsig.tools.exception.DriverException;
52 53

  
53 54
import com.iver.andami.messages.NotificationManager;
54 55
import com.iver.andami.ui.mdiManager.IWindow;
......
151 152

  
152 153

  
153 154

  
154
	public void createAlias() throws ReadException {
155
	public void createAlias() throws DataException {
155 156
		FeatureType sds = esModel.getDefaultFeatureType();
156 157
//		mapping = new int[sds.getFieldCount()+1];
157 158
//		alias = new String[sds.getFieldCount()+1];
......
162 163
			alias = new String[size];
163 164
		for (int i = 0; i < size; i++) {
164 165
			mapping[i]=i;
165
			alias[i]=sds.getByOrder(i).getName();
166
			alias[i] = sds.getAttributeDescriptor(i).getName();
166 167

  
167 168
//			if (i==0){
168 169
//				mapping[i]=i;
......
660 661

  
661 662
	public void setModel(FeatureStore fstore) {
662 663
		setTheModel(fstore);
663
		((AbstractFeatureStore)fstore).notifyResourceChange();
664
		//((AbstractFeatureStore)fstore).notifyResourceChange();
664 665
		try {
665 666
//			if (mapping==null) {
666 667
				createAlias();
667 668
//			}
668
		} catch (ReadException e) {
669
		} catch (DataException e) {
669 670
			e.printStackTrace();
670 671
			NotificationManager.addError(e);
671 672
		}

Also available in: Unified diff