1

有谁知道如何在我的可编辑表中跟踪修改后的项目值?

该表有一个BeanContainer数据源,我想在每次在表中编辑或添加项目时更新它。

看起来很简单,但我一直在到处搜索,但没有任何帮助,谢谢!

以下代码显示了我的 BeanContainer:

 `public BeanItemContainer createContainer() {              
        BeanItemContainer<PS_SECTION> beans = new BeanItemContainer<PS_SECTION>(PS_SECTION.class);

                   beans.addNestedContainerProperty("PS_SECTION");
                   beans.addNestedContainerProperty("NAME");
                   beans.addNestedContainerProperty("VORDER");

                for (int i = 0; i < list.size(); i++) {
                    PS_SECTION section = list.get(i);

                        Long ps =  section.getPS_SECTION();
                        String na = section.getNAME();
                        Long is = section.getISACTIVE();
                        Long isg = section.getISGLOBAL();
                        Long or = section.getVORDER();

                     Object itemId = beans.addItem(new PS_SECTION(ps, na, is, isg, or));
                }

                return beans;
            }`
4

0 回答 0