Revision 13995 branches/v10/extensions/extOracleSpatial/src/es/prodevelop/cit/gvsig/jdbc_spatial/gui/jdbcwizard/TablesListItem.java
TablesListItem.java | ||
---|---|---|
42 | 42 |
*/ |
43 | 43 |
package es.prodevelop.cit.gvsig.jdbc_spatial.gui.jdbcwizard; |
44 | 44 |
|
45 |
import com.iver.andami.PluginServices; |
|
45 | 46 |
import com.iver.cit.gvsig.fmap.MapControl; |
46 | 47 |
import com.iver.cit.gvsig.fmap.drivers.DefaultDBDriver; |
47 | 48 |
|
... | ... | |
49 | 50 |
import java.sql.SQLException; |
50 | 51 |
|
51 | 52 |
import javax.swing.JCheckBox; |
53 |
import javax.swing.JOptionPane; |
|
52 | 54 |
|
53 | 55 |
|
54 | 56 |
/** |
... | ... | |
132 | 134 |
public UserTableSettingsPanel getUserTableSettingsPanel() |
133 | 135 |
throws SQLException { |
134 | 136 |
if (tableSettingsPanel == null) { |
135 |
String[] ids = driver.getIdFieldsCandidates(conn, tableName); |
|
136 |
String[] geos = driver.getGeometryFieldsCandidates(conn, tableName); |
|
137 |
|
|
138 |
String[] ids = new String[0]; |
|
139 |
try { |
|
140 |
ids = driver.getIdFieldsCandidates(conn, tableName); |
|
141 |
} catch (SQLException se) { |
|
142 |
String msg = PluginServices.getText(this, "id_not_available") + " " + tableName |
|
143 |
+ ":\n" + se.getMessage(); |
|
144 |
String title = PluginServices.getText(this, "id_error"); |
|
145 |
JOptionPane.showMessageDialog(parent, msg, title, JOptionPane.ERROR_MESSAGE); |
|
146 |
setSelected(false); |
|
147 |
} |
|
148 |
|
|
149 |
String[] geos = new String[0]; |
|
150 |
try { |
|
151 |
geos = driver.getGeometryFieldsCandidates(conn, tableName); |
|
152 |
} catch (SQLException se) { |
|
153 |
String msg = PluginServices.getText(this, "geo_field_not_available") |
|
154 |
+ ":\n" + PluginServices.getText(this, se.getMessage()) + ": " + tableName; |
|
155 |
String title = PluginServices.getText(this, "geo_field_error"); |
|
156 |
JOptionPane.showMessageDialog(parent, msg, title, JOptionPane.ERROR_MESSAGE); |
|
157 |
setSelected(false); |
|
158 |
} |
|
137 | 159 |
|
138 | 160 |
int ids_size = ids.length; |
139 | 161 |
FieldComboItem[] ids_ci = new FieldComboItem[ids_size]; |
Also available in: Unified diff