|
|
|
@ -11,11 +11,15 @@ import com.fr.form.ui.BaseChartEditor;
|
|
|
|
|
import com.fr.form.ui.ElementCaseEditor; |
|
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
|
import com.fr.script.Calculator; |
|
|
|
|
import com.fr.stable.EmbParaFilter; |
|
|
|
|
import com.fr.stable.ParameterProvider; |
|
|
|
|
import com.fr.stable.js.WidgetName; |
|
|
|
|
|
|
|
|
|
import com.fr.util.ParameterApplyHelper; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
public class FormModelAdapter extends DesignModelAdapter<Form, BaseJForm<Form>> { |
|
|
|
|
|
|
|
|
@ -42,6 +46,16 @@ public class FormModelAdapter extends DesignModelAdapter<Form, BaseJForm<Form>>
|
|
|
|
|
jTemplate.populateParameter(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void tableDataParametersChanged(String oldName, String tdName, TableData tableData) { |
|
|
|
|
Map<String, ParameterProvider> map = new HashMap<>(); |
|
|
|
|
addGlobalParameters(map); |
|
|
|
|
updateTableDataParameters(oldName, tdName, tableData, map, parameterProvider -> !EmbParaFilter.isFRLayerTypePara(parameterProvider)); |
|
|
|
|
ParameterApplyHelper.addPara2Map(map, this.getBook().getTemplateParameters()); |
|
|
|
|
parameters = map.values().toArray(new Parameter[0]); |
|
|
|
|
jTemplate.populateParameter(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 控件配置改变. |
|
|
|
|
*/ |
|
|
|
@ -135,6 +149,13 @@ public class FormModelAdapter extends DesignModelAdapter<Form, BaseJForm<Form>>
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected Parameter[] getLatestParameters() { |
|
|
|
|
return this.getBook().getParameters(); |
|
|
|
|
Map<String, ParameterProvider> map = new HashMap<>(); |
|
|
|
|
addGlobalParameters(map); |
|
|
|
|
|
|
|
|
|
addTableDataParameters(map, parameterProvider -> !EmbParaFilter.isFRLayerTypePara(parameterProvider)); |
|
|
|
|
|
|
|
|
|
ParameterApplyHelper.addPara2Map(map, this.getBook().getTemplateParameters()); |
|
|
|
|
|
|
|
|
|
return map.values().toArray(new Parameter[0]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|