Browse Source

Merge pull request #873 in BA/design from ~HZZZ/design:dev to dev

* commit 'f0bb46a9cdc0e7addc5206965c0ee70fa458e9dd':
  fix
  fix
master
superman 8 years ago
parent
commit
da95d1f0f4
  1. 21
      designer_base/src/com/fr/design/data/DesignTableDataManager.java

21
designer_base/src/com/fr/design/data/DesignTableDataManager.java

@ -383,15 +383,8 @@ public abstract class DesignTableDataManager {
if (ArrayUtils.isEmpty(parameters)) {
parameters = tabledata.getParameters(Calculator.createCalculator());
}
boolean hasValue = true;
for (ParameterProvider parameter : parameters) {
if (parameter.getValue() == null || ComparatorUtils.equals(StringUtils.EMPTY, parameter.getValue())) {
hasValue = false;
break;
}
}
final Map<String, Object> parameterMap = new HashMap<>();
if (!hasValue || isMustInputParameters) {
if (needInputParams(isMustInputParameters, parameters)) {
final ParameterInputPane pPane = new ParameterInputPane(parameters);
pPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override
@ -425,6 +418,18 @@ public abstract class DesignTableDataManager {
}
}
private static boolean needInputParams(boolean mustInputParameters, ParameterProvider[] parameters) {
if (mustInputParameters && ArrayUtils.isNotEmpty(parameters)) {
return true;
}
for (ParameterProvider parameter : parameters) {
if (parameter.getValue() == null || StringUtils.EMPTY.equals(parameter.getValue())) {
return true;
}
}
return false;
}
/**
* 返回<code>TableData</code>的数据列,注意<code>TableData</code>
* 是没有考虑参数的用于简单的查询语句生成的<code>TableData</code>, 或者

Loading…
Cancel
Save