3 Replies Latest reply: May 7, 2012 9:09 AM by 932381 RSS

    how to re-query viewobject

    user2707888
      Hi Guys,

      How to re-query view object( with the new values from database) after an event.

      I have a text input and a submit button, when the user enters order number and click on the button I am displaying order information in a table. Now I have one more
      button which calls a oracle api through a database procedure( which prints some documents and process some information about the order).
      1) After this event(click of button) I also want to re-query existing view object because order information has been changed through that api call.
      example: earlier order status was open after api call the status has been changed to closed. it shows closed in the database but on the form it still showing open.

      2) How do i display a message saying " reports have been submitted to xxx printer" in the middle of page( I have used OAException to display but it shows at the top of the page).

      Thanks.
        • 1. Re: how to re-query viewobject
          932381
          Hi,

          If you still stuck with your issue:
          For Req 1> Use VO.execute_query method to re-query the vo.
          For Req 2> You can use the TIP message in the page, And display that tip message conditionally.If you need help to doing that let me know.

          Sample code for this is available in the OAF user guide.

          Regards
          Apurba K Saha
          • 2. Re: how to re-query viewobject
            user2707888
            Thanks for the help. first one worked. Can you please send me some code for adding dynamic message in tip bean.
            Also one more question- I am currently displaying some data in advanced table and one of the column is serial number.
            I need to display serial number if it exists for that line otherwise I need to display a button.( so conditionally i need to display
            either serial number data or serial number button). i have the serial number attribute in the view object.

            Thanks again.
            • 3. Re: how to re-query viewobject
              932381
              Hi,

              Please mark that your message as resolved , for your new query post a new message with proper heading I will give you the solution.

              Regards
              Apurba K saha