Browse Source
Merge in DESIGN/design from ~HADES/design:feature/x to feature/x * commit 'feaf3a37bfb81a1e85aad9073652d1e931bb70c1': KERNEL-8990 远程设计配置保存问题的优化research/11.0
Hades
3 years ago
6 changed files with 136 additions and 148 deletions
@ -0,0 +1,48 @@ |
|||||||
|
package com.fr.design.data.datapane.connect; |
||||||
|
|
||||||
|
import com.fr.design.dialog.BasicDialog; |
||||||
|
import com.fr.design.dialog.DialogActionAdapter; |
||||||
|
import com.fr.design.editlock.EditLockUtils; |
||||||
|
import com.fr.design.mainframe.DesignerContext; |
||||||
|
import com.fr.file.ConnectionConfig; |
||||||
|
import com.fr.report.LockItem; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author hades |
||||||
|
* @version 11.0 |
||||||
|
* Created by hades on 2021/9/8 |
||||||
|
*/ |
||||||
|
public class ConnectionListDialogActionAdapter extends DialogActionAdapter { |
||||||
|
|
||||||
|
private final ConnectionManagerPane connectionManagerPane; |
||||||
|
private final BasicDialog connectionListDialog; |
||||||
|
private final ConnectionConfig connectionConfig; |
||||||
|
|
||||||
|
public ConnectionListDialogActionAdapter(ConnectionManagerPane connectionManagerPane, |
||||||
|
BasicDialog connectionListDialog, |
||||||
|
ConnectionConfig connectionConfig) { |
||||||
|
this.connectionManagerPane = connectionManagerPane; |
||||||
|
this.connectionListDialog = connectionListDialog; |
||||||
|
this.connectionConfig = connectionConfig; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void doOk() { |
||||||
|
if (!connectionManagerPane.isNamePermitted()) { |
||||||
|
connectionListDialog.setDoOKSucceed(false); |
||||||
|
return; |
||||||
|
} |
||||||
|
connectionManagerPane.update(connectionConfig); |
||||||
|
DesignerContext.getDesignerBean("databasename").refreshBeanElement(); |
||||||
|
// 关闭定义数据连接页面,为其解锁
|
||||||
|
EditLockUtils.unlock(LockItem.CONNECTION); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void doCancel() { |
||||||
|
// 关闭定义数据连接页面,为其解锁
|
||||||
|
super.doCancel(); |
||||||
|
EditLockUtils.unlock(LockItem.CONNECTION); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue