Browse Source

REPORT-29773 外包验收:附件模板参数面板下拉树控件第3层设置了列序号,预览无内容

feature/big-screen
zack 5 years ago
parent
commit
97a5d34dd1
  1. 16
      designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataConfigPane.java

16
designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataConfigPane.java

@ -7,6 +7,7 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.present.dict.TableDataDictPane; import com.fr.design.present.dict.TableDataDictPane;
import com.fr.form.ui.tree.LayerConfig; import com.fr.form.ui.tree.LayerConfig;
import com.fr.form.ui.tree.LayerDependence; import com.fr.form.ui.tree.LayerDependence;
import com.fr.stable.StringUtils;
import java.awt.*; import java.awt.*;
import java.util.*; import java.util.*;
@ -73,13 +74,20 @@ public class LayerDataConfigPane extends BasicBeanPane<LayerConfig> {
if (wrapper != null) { if (wrapper != null) {
columnNames = wrapper.calculateColumnNameList(); columnNames = wrapper.calculateColumnNameList();
} else { } else {
columnNames = new ArrayList<String>(); columnNames = new ArrayList<>();
} }
String viewColStr = tableDataDictPane.updateBean().getValueColumnName(); TableDataDictionary dataDictionary = tableDataDictPane.updateBean();
String modelColStr = tableDataDictPane.updateBean().getKeyColumnName(); String viewColStr = dataDictionary.getValueColumnName();
TableDataDictionary dictionary = tableDataDictPane.updateBean(); String modelColStr = dataDictionary.getKeyColumnName();
int viewCol = columnNames.indexOf(viewColStr); int viewCol = columnNames.indexOf(viewColStr);
int modelCol = columnNames.indexOf(modelColStr); int modelCol = columnNames.indexOf(modelColStr);
if (StringUtils.EMPTY.equals(viewColStr)) {
viewCol = dataDictionary.getValueColumnIndex();
}
if (StringUtils.EMPTY.equals(modelColStr)) {
modelCol = dataDictionary.getKeyColumnIndex();
}
TableDataDictionary dictionary = tableDataDictPane.updateBean();
//将数据设置到当前正在修改的layerData中 //将数据设置到当前正在修改的layerData中
this.layerConfig.setDictionary(dictionary); this.layerConfig.setDictionary(dictionary);
this.layerConfig.setModelColumn(modelCol); this.layerConfig.setModelColumn(modelCol);

Loading…
Cancel
Save