|
|
|
@ -98,8 +98,9 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
|
if(mainPanel instanceof JNDIDefPane && SecurityConfig.getInstance().isDisableJNDI()) { |
|
|
|
|
FineJOptionPane.showMessageDialog(mainPanel, Toolkit.i18nText("Fine-Design_Basic_Database_Connection_JNDI_Disabled"), Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE); |
|
|
|
|
if (mainPanel instanceof JNDIDefPane && SecurityConfig.getInstance().isDisableJNDI()) { |
|
|
|
|
FineJOptionPane.showMessageDialog(mainPanel, Toolkit.i18nText("Fine-Design_Basic_Database_Connection_JNDI_Disabled"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// Try the java connection.
|
|
|
|
@ -499,7 +500,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
|
|
|
|
|
driverTips.setText(Toolkit.i18nText("Fine_Designer_Not_Found_Driver")); |
|
|
|
|
gridJpanel.add(driverTips); |
|
|
|
|
UILabel deatail = new UILabel(); |
|
|
|
|
String content = Toolkit.i18nText("Fine_Designer_Not_Found") + " " + detailMessage+ " " + Toolkit.i18nText("Fine_Designer_Driver"); |
|
|
|
|
String content = Toolkit.i18nText("Fine_Designer_Not_Found") + " " + detailMessage + " " + Toolkit.i18nText("Fine_Designer_Driver"); |
|
|
|
|
deatail.setText(content); |
|
|
|
|
deatail.setToolTipText(content); |
|
|
|
|
gridJpanel.add(deatail); |
|
|
|
@ -544,7 +545,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
|
|
|
|
|
jsp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); |
|
|
|
|
|
|
|
|
|
Connection con = DatabaseConnectionPane.this.updateBean(); |
|
|
|
|
if(con instanceof JDBCDatabaseConnection && WorkContext.getCurrent().isLocal()) { |
|
|
|
|
if (con instanceof JDBCDatabaseConnection && WorkContext.getCurrent().isLocal()) { |
|
|
|
|
String driverPath = JarFileParseUtil.getDriverClassPath((JDBCDatabaseConnection) con); |
|
|
|
|
jta.append(Toolkit.i18nText("Fine_Designer_Current_Driver_Path") + ":" + driverPath + "\n"); |
|
|
|
|
JPanel testDriverPanel = generateTestDriverPanel((JDBCDatabaseConnection) con, driverPath); |
|
|
|
@ -587,16 +588,17 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
|
|
|
|
|
public void mouseExited(MouseEvent e) { |
|
|
|
|
driverTestTip.setCursor(Cursor.getDefaultCursor()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
|
try { |
|
|
|
|
String path; |
|
|
|
|
if(driverPath.endsWith(JarFileParseUtil.JAR_MARKER)) { |
|
|
|
|
if (driverPath.endsWith(JarFileParseUtil.JAR_MARKER)) { |
|
|
|
|
path = new File(driverPath).getParent(); |
|
|
|
|
} else { |
|
|
|
|
path = driverPath; |
|
|
|
|
} |
|
|
|
|
if(hasDuplicateDriver(con.getDriver(), path)) { |
|
|
|
|
if (hasDuplicateDriver(con.getDriver(), path)) { |
|
|
|
|
testResult.setForeground(Color.RED); |
|
|
|
|
testResult.setText(Toolkit.i18nText("Fine_Designer_Driver_Conflict")); |
|
|
|
|
} else { |
|
|
|
|