|
|
@ -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); |
|
|
|