Browse Source

REPORT-140563 【数据集替换】参数面板所有控件的控件值字段,都没有替换

release/11.0
Destiny.Lin 2 weeks ago
parent
commit
7442d6c989
  1. 15
      designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java

15
designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java

@ -26,9 +26,12 @@ import com.fr.design.actions.replace.info.WidgetInfo;
import com.fr.design.actions.replace.info.base.ITContent;
import com.fr.design.mainframe.JTemplate;
import com.fr.form.FormElementCaseProvider;
import com.fr.form.data.DataBinding;
import com.fr.form.ui.DataControl;
import com.fr.form.ui.DictionaryContainer;
import com.fr.form.ui.ElementCaseEditor;
import com.fr.form.ui.Widget;
import com.fr.form.ui.concept.data.ValueInitializer;
import com.fr.general.ComparatorUtils;
import com.fr.general.data.Condition;
import com.fr.general.data.TableDataColumn;
@ -492,6 +495,18 @@ public class ReplaceUtils {
ElementCaseHelper.replaceTableDataDictionary(tdd, ndd, entities);
}
}
if (widget instanceof DataControl) {
ValueInitializer value = ((DataControl) widget).getWidgetValue();
if (value.getValue() instanceof DataBinding) {
DataBinding binding = (DataBinding) value.getValue();
for (TableReplacementEntity entity : entities) {
if (StringUtils.equals(entity.getOldName(), binding.getDataSourceName())) {
value.setValue(new DataBinding(entity.getNewName(), entity.getTargetField(binding.getDataBindingKey())));
break;
}
}
}
}
}
/**

Loading…
Cancel
Save