|
|
|
@ -7,6 +7,7 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
|
|
|
|
|
import com.fr.design.present.dict.TableDataDictPane; |
|
|
|
|
import com.fr.form.ui.tree.LayerConfig; |
|
|
|
|
import com.fr.form.ui.tree.LayerDependence; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.util.*; |
|
|
|
@ -73,13 +74,20 @@ public class LayerDataConfigPane extends BasicBeanPane<LayerConfig> {
|
|
|
|
|
if (wrapper != null) { |
|
|
|
|
columnNames = wrapper.calculateColumnNameList(); |
|
|
|
|
} else { |
|
|
|
|
columnNames = new ArrayList<String>(); |
|
|
|
|
columnNames = new ArrayList<>(); |
|
|
|
|
} |
|
|
|
|
String viewColStr = tableDataDictPane.updateBean().getValueColumnName(); |
|
|
|
|
String modelColStr = tableDataDictPane.updateBean().getKeyColumnName(); |
|
|
|
|
TableDataDictionary dictionary = tableDataDictPane.updateBean(); |
|
|
|
|
TableDataDictionary dataDictionary = tableDataDictPane.updateBean(); |
|
|
|
|
String viewColStr = dataDictionary.getValueColumnName(); |
|
|
|
|
String modelColStr = dataDictionary.getKeyColumnName(); |
|
|
|
|
int viewCol = columnNames.indexOf(viewColStr); |
|
|
|
|
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中
|
|
|
|
|
this.layerConfig.setDictionary(dictionary); |
|
|
|
|
this.layerConfig.setModelColumn(modelCol); |
|
|
|
|