6 Replies Latest reply: Jan 23, 2013 4:39 AM by 980655 RSS

    ADF:Dynamic Region Refreshing

    980655
      Hi,

      My JDeveloper version is 11.1.1.5

      I am facing one problem.

      I have one table to which I have Save and Remove buttons.

      To the Save button, I have one action which programmatically inserts the row into the table. And Remove button removes the row present from the table programmatically.

      The Problem I am facing is, whenever I save or remove I need to reload the page to see the row inserted or deleted. It is not happening automatically...
      Could anyone please tell me how to reload a dynamic region which reflects DB table modification onto the Dynamic Region?

      Many thanks in advance
        • 1. Re: ADF:Dynamic Region Refreshing
          BrianV
          You can restart the taskflow if you need to,

          however just calling adfFacesContext.addPartialTarget(table); in your bean will work.

          Your button should have PartialSubmit = True

          Brian S
          • 2. Re: ADF:Dynamic Region Refreshing
            Frank Nimphius-Oracle
            Hi,

            ensure the button has its partialSubmit="true" set and then reference the button ID from the table PatialTrigger property. If this doesn't do the trick then you obviously remove/add the row by accessing the underlying business service (ADF BC ?) directly, which you should not.

            Frank
            • 3. Re: ADF:Dynamic Region Refreshing
              980655
              Hi Guys,

              Here I will try to put my scenario...

              There is one table called APPLICATION which displays all the data using ViewObject1. To this table I am adding and saving and deleting a new row.

              ViewObject1 Query :
              SELECT Application.BUSINESS_UNIT,
              Application.DESCRIPTION,
              Application.ID,
              Application.NAME
              FROM APPLICATION Application

              And there is one more viewObject which refers the same table which also displays the same columns with the data which is mentioned in below viewobject query.

              ViewObject2 Query:

              SELECT Application.BUSINESS_UNIT,
              Application.DESCRIPTION,
              Application.ID,
              Application.NAME
              FROM APPLICATION Application
              WHERE ID not in (select ID_application from project_application)

              So

              Whenever I am saving/removing a row, the table with ViewObject1 is being reflected with the saved row... but not the table with ViewObject2. So can you please advise me how to reflect the saved row in ViewObject2 also..

              ViewObject1 and ViewObject2 are referring to the same table(APPLICATION) in the DB with different queries...

              Many Thanks in Advance,

              Edited by: 977652 on Jan 22, 2013 4:42 AM
              • 4. Re: ADF:Dynamic Region Refreshing
                980655
                Hi Brian,

                Could you please tell me how to restart the task flow? Does it load the data from the tables that i inserted?


                Many Thanks.
                • 5. Re: ADF:Dynamic Region Refreshing
                  BrianV
                  All you need is to refresh iterator2? You are working too hard.

                  Normally both VO1 and VO2 should have dependency on save/delete buttons

                  PPR should refresh both. Remember to set PartialSubmit=true for both buttons.


                  Alternative would be

                  in the code would be get DCBindingContainer from DCBindingContainer findIteratorBinding
                  and execute iterator.

                  You do not need to restart BTF.
                  • 6. Re: ADF:Dynamic Region Refreshing
                    980655
                    Your suggestion was helpful in re-executing the iterator. But something more functionality I had to implement... now everything is working fine.

                    Thank You !