Revision 44880
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/searchpanel/DefaultSearchPanel.java | ||
---|---|---|
940 | 940 |
WindowManager_v2 winmanager = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
941 | 941 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
942 | 942 |
final FeatureAttributesSelectionPanel panel = DALSwingLocator.getManager().createFeatureAttributeSelectionPanel(); |
943 |
FeatureType ftype; |
|
943 |
FeatureType ftype = this.getFeatureType();
|
|
944 | 944 |
try { |
945 |
ftype = store.findFirst(this.parameters.getQuery()).getType(); |
|
946 |
} catch (DataException ex) { |
|
947 |
ftype = this.getFeatureType(); |
|
945 |
Feature f = store.findFirst(this.parameters.getQuery()); |
|
946 |
if( f!=null ) { |
|
947 |
ftype = f.getType(); |
|
948 |
} |
|
949 |
} catch (Throwable ex) { |
|
950 |
LOGGER.warn("Can't retrieve the feature type from the first feature.",ex); |
|
948 | 951 |
} |
949 | 952 |
panel.setFeatureType(ftype); |
950 | 953 |
panel.setSelectedNames(this.parameters.getResultColumnNames()); |
Also available in: Unified diff