Browse Source

Merge pull request #3927 in DESIGN/design from final/10.0 to bugfix/10.0

* commit 'f55503ab3058e9baadd0278ff32aceb73fef020d':
  REPORT-50788 删除数据集更新缓存 漏交
  REPORT-50788 删除数据集更新缓存
bugfix/10.0
superman 4 years ago
parent
commit
c10d9ce50b
  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

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.stable.js.WidgetName;
import com.fr.util.ParameterApplyHelper; import com.fr.util.ParameterApplyHelper;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; 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) { protected void addGlobalParameters(Map<String, ParameterProvider> map) {
// 添加全局参数 // 添加全局参数
Parameter[] glbParas = ParameterConfig.getInstance().getGlobalParameters(); 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()); TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter());
TableDataSourceAction.this.getEditingComponent().fireTargetModified(); TableDataSourceAction.this.getEditingComponent().fireTargetModified();
fireDSChanged(tableDataPane.getDsNameChangedMap()); fireDSChanged(tableDataPane.getDsNameChangedMap());
DesignModelAdapter.getCurrentModelAdapter().updateAllParameters();
} }
}); });
reportTableDataDialog.setVisible(true); 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(); fireDSChanged();
checkButtonEnabled(); checkButtonEnabled();
DesignTableDataManager.removeSelectedColumnNames(selectedNO.getName()); DesignTableDataManager.removeSelectedColumnNames(selectedNO.getName());
DesignModelAdapter.getCurrentModelAdapter().removeTableDataParameters(selectedNO.getName());
} }
} }
} }

Loading…
Cancel
Save