【问题标题】:delete from database after deleting from the table ADF从表 ADF 中删除后从数据库中删除
【发布时间】:2016-07-18 20:30:05
【问题描述】:

我使用 ADF 制作了一个小应用程序,它在将表格中的行缩小到页面上的小图片(回收站)后从表格中删除 但现在我希望在数据库上提交此删除 我该怎么做?

【问题讨论】:

    标签: oracle-adf


    【解决方案1】:

    您使用的是哪个 JDeveloper 版本? 您应该能够从“数据控件”选项卡>您的数据控件>“操作”>提交中拖放一个提交按钮到您的页面上。

    或者您可以通过 bean 来实现(确保 Commit 绑定在您的页面/片段上)。这是一个很好的例子:http://adfsonal.blogspot.be/2013/02/perform-delete-and-commit-by-single.html

    【讨论】:

      【解决方案2】:
      Key k =EntityImpl.createPrimaryKey(attribute);
              EntityImpl rw =
              (EntityImpl)EntityImpl.getDefinitionObject().findByPrimaryKey(getDBTransaction(), k);
              rw.remove();
              this.getDBTransaction().commit();
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2023-03-26
        • 1970-01-01
        • 2021-09-29
        • 1970-01-01
        • 2013-01-28
        • 1970-01-01
        • 1970-01-01
        • 2016-07-07
        相关资源
        最近更新 更多