2 Replies Latest reply: Mar 10, 2011 9:58 AM by Kees van der Veer RSS

    How to render page in bean

    Kees van der Veer
      Hi,

      I'm using Jdeveloper 11.1.1.4 and creating Oracle Fusion Web Application.

      I want to create an experiment application by showing a subject a list of words and pictures.
      The subject has to press a Next button and will first see a word and then after 2 seconds
      (without any user action) the word will be hidden and a picture will appear. The user must
      select a value on a radio button and then press the Next button to see the next word....

      I have created a jspx page and a bean for the Next button:

      public String next_action() {
      BindingContainer bindings = getBindings();
      OperationBinding operationBinding = bindings.getOperationBinding("Next");
      Object result = operationBinding.execute();

      this.getImageExp().setVisible(false);
      this.getWordExp().setVisible(true);

      // How to render page at this point?

      try {
      System.out.println("next_action: sleeping 2 sec");
      Thread.sleep(2000);
      } catch (java.lang.InterruptedException ie) {
      System.out.println("Sleep interrupted: " + ie.getMessage());
      }

      this.getImageExp().setVisible(true);
      this.getWordExp().setVisible(false);

      return null;
      }

      I'm relatively new to Oracle ADF and my problem is that the page is only rendered
      at the end of the bean.
      How can I show the page to the user before the 2 seconds pause?

      Best,

      Kees.