0

I have template group box, for reuse purposes.

In this template I have function witch need to fill data inside this template. Because you can't create new instance of FormData in template I have abstract function for getting new instance of form data. Then each form that use this template implement this method.

 protected abstract AbstractMyBoxData getFormData();

My function is look like this :

 public void setValuesInTemplates(Long parameter)
 {
    AbstractMyBoxData formData = this.getFormData();
    this.exportFormFieldData(formData);
    formData = BEANS.get(iMyService.class).setSomeValue(parameter);
    this.importFormFieldData(formData, true);
 } 

My problem is that I get correct form data from service, but when I import this form data, template does not change UI.

Why is this?

4

1 回答 1

1

看看importFormFieldData(..)for groupboxes 的实现。这里定义了实现:

AbstractFormField.importFormFieldData(AbstractFormFieldData, boolean)

……它是空的。

完整的解释(和解决方案)可以在这里找到:

Table 和 GroupBox 以获取有关行选择的详细信息

[你可能需要为 Neon 重做它,但变化并没有那么大。中的大部分代码FormDataUtility2都是从]复制粘贴的AbstractForm

我确信在表单中硬编码导入逻辑是一个错误,但当时我没能说服团队。随意在论坛帖子中添加评论。

于 2016-01-21T07:41:01.677 回答