From 7442d6c989c3c3fe9fc7eab1aef1fc901f9ebf07 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Thu, 14 Nov 2024 10:50:22 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-140563=20=E3=80=90=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E6=9B=BF=E6=8D=A2=E3=80=91=E5=8F=82=E6=95=B0=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E6=89=80=E6=9C=89=E6=8E=A7=E4=BB=B6=E7=9A=84=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E5=80=BC=E5=AD=97=E6=AE=B5=EF=BC=8C=E9=83=BD=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/replace/utils/ReplaceUtils.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java index f5445542d8..db768e5be6 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java +++ b/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; + } + } + } + } } /**