Browse Source

Merge pull request #3928 in DESIGN/design from bugfix/10.0 to release/10.0

* commit 'c10d9ce50be5ee7d769ee4c47401f9de34a62f9a':
  REPORT-50788 删除数据集更新缓存 漏交
  REPORT-50788 删除数据集更新缓存
  REPORT-50096 在设计器中更改数据库类型后 数据库名称字段操作和之前保持一致
zheng-1641779399395
superman 4 years ago
parent
commit
77962fb964
  1. 18
      designer-base/src/main/java/com/fr/design/DesignModelAdapter.java
  2. 1
      designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java
  3. 1
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  4. 2
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

18
designer-base/src/main/java/com/fr/design/DesignModelAdapter.java

@ -21,6 +21,8 @@ import com.fr.stable.StringUtils;
import com.fr.stable.js.WidgetName;
import com.fr.util.ParameterApplyHelper;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@ -338,6 +340,22 @@ public abstract class DesignModelAdapter<T extends BaseBook, S extends JTemplate
}
}
public void removeTableDataParameters(String tdName) {
ParameterProvider[] tableDataParameters = tableDataParametersMap.remove(tdName);
List<Parameter> allParameterList = new ArrayList<>(Arrays.asList(parameters));
List<Parameter> tableDataParameterList = new ArrayList<>();
for (ParameterProvider parameterProvider : tableDataParameters) {
tableDataParameterList.add((Parameter) parameterProvider);
}
allParameterList.removeAll(tableDataParameterList);
parameters = allParameterList.toArray(new Parameter[0]);
}
public void updateAllParameters() {
parameters = getLatestParameters();
}
protected void addGlobalParameters(Map<String, ParameterProvider> map) {
// 添加全局参数
Parameter[] glbParas = ParameterConfig.getInstance().getGlobalParameters();

1
designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java

@ -60,6 +60,7 @@ public class TableDataSourceAction extends TemplateComponentAction<JTemplate<?,
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter());
TableDataSourceAction.this.getEditingComponent().fireTargetModified();
fireDSChanged(tableDataPane.getDsNameChangedMap());
DesignModelAdapter.getCurrentModelAdapter().updateAllParameters();
}
});
reportTableDataDialog.setVisible(true);

1
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -288,6 +288,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
fireDSChanged();
checkButtonEnabled();
DesignTableDataManager.removeSelectedColumnNames(selectedNO.getName());
DesignModelAdapter.getCurrentModelAdapter().removeTableDataParameters(selectedNO.getName());
}
}
}

2
designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

@ -303,6 +303,8 @@ public class JDBCDefPane extends JPanel {
urlTextField.setText(dus[i].getURL());
}
}
// 更改数据库类型后 数据库名称置空和之前逻辑保持一致
jdbcDatabase.setDatabase(StringUtils.EMPTY);
}
};

Loading…
Cancel
Save