5 Replies Latest reply: Apr 28, 2010 9:17 AM by Frank Nimphius-Oracle RSS

    How to delete multiple rows from ADF table

    769721
      How to delete multiple rows from ADF table
        • 1. Re: How to delete multiple rows from ADF table
          John Stegeman
          I'll answer your question if you answer mine with an example based upon your original question:

          How to ask a proper question?

          (That is just my obtuse way of saying to you, you must provide more information in order to get an answer. What version of JDeveloper? What do you mean by "ADF table?" What technology are you using for the model layer?)

          http://forums.oracle.com/forums/ann.jspa?annID=56
          and
          http://catb.org/~esr/faqs/smart-questions.html
          may be good reading for you

          John
          • 2. Re: How to delete multiple rows from ADF table
            769721
            i use Oracle Adf techonolgy and i have multiple rows ineed to put selectBooleanCheckbox beside each row , to allow user to click to desire row he want to delete it
            after the use check the desired rows and enter delete the operation must be executed
            so how can i do that
            • 3. Re: How to delete multiple rows from ADF table
              Timo Hahn
              Really good link John :-)
              We may ask Shay to put it in his 'before you post' message.

              Timo
              • 4. Re: How to delete multiple rows from ADF table
                Michael C. Fons
                What version of JDev are you using? Are you using ADF/BC?

                If you are using version 10g of JDev and the ADF/BC technology, then you should look at how they do deletes in SRDemo. If you are using JDev 11g, then I have seen multi-select subject covered on this forum.

                (I appreciate that you are adding detail to your entries. John is an extremely nice guy; that he and so many others offer their help for FREE is amazing; if he is asking for information is it because he needs it to give you an answer that works.)
                • 5. Re: How to delete multiple rows from ADF table
                  Frank Nimphius-Oracle
                  Hi,

                  best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list

                  Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code

                  Frank