4 Replies Latest reply on Jan 30, 2013 9:25 AM by vikram jit singh - oracle

    Partially submitting a form when selecting a table row

    vikram jit singh - oracle
      Hi,

      I have a use case and would like to know how to proceed forward with it. Sectionally it can be shown like:

      SUBFORM
      -- TABLE 1
      -- TABLE 2
      -- INPUT FIELD
      -- SUBMIT BUTTON - Partial Submit

      TABLE 1 is SELECTABLE READ-ONLY list whereas TABLE 2 list is dependent on the selection in TABEL 1 and consists of input components and is submittable. Whenever I press SUBMIT, all the contents are partially submitted (this is trivial to implement).

      The question is how can I enable the SUBFORM PARTIAL SUBMISSION by just selecting a new row in TABLE 1.

      Say for exmple... I select ROW 2 in TABLE1, my TABLE2 is refreshed depending upon the value of ROW2 from the server and then I make changes in TABLE2. Now when I select ROW 4 in TABLE1, it should submit TABLE2, submit INPUT FIELD goto the server, perform the required processing and return with a refreshed TABLE2 with the values dependent on ROW4.

      How may I achieve this?
        • 1. Re: Partially submitting a form when selecting a table row
          Dimitar Dimitrov
          I am supposing that Table2 is already defined as a partial target of Table1 (as far as you said that it was refreshed whenever you changed the selected row in Table1). If it is not so, then mark Table2 as a partial target of Table1 (e.g. set Table2's "partialTriggers" attribute to reference Table1).

          Mark then the standalone input field as a partial target of the Table1 in order to be submitted whenever Table1 causes a partial submit (e.g. set input field's "partialTriggers" attribute to reference the Table1).

          If you have to do some special processing (e.g. not only standard data submit and validation) during a partial submit from Table1, then you may have to implement your own selection listener for Table1 (use the table tag's attribute "selectionListener").

          Dimitar
          • 2. Re: Partially submitting a form when selecting a table row
            vikram jit singh - oracle
            Hi Dimitar,

            Unfortunately, this does not partially submit the contents of TABLE2 when the selection of TABLE1 is changed. The selection change does submit the INPUT FIELD.

            May I know how will TABLE2 be submitted accordingly?

            Thanks.
            • 3. Re: Partially submitting a form when selecting a table row
              Dimitar Dimitrov
              What you are describing (i.e. values entered/modified in TABLE2 are not submitted/validated when the user navigates to another row in TABLE1) may happen only if TABLE1 is configured with <tt>immediate="true"</tt>. I created a simple test case in JDev 11.1.1.6 and checked that. This is not a bug but it is expected behavior. Please, have a look here in the documentation for an explanation:
              [url http://docs.oracle.com/cd/E23943_01/web.1111/b31973/af_lifecycle.htm#CIACBJCJ]Using the Immediate Attribute

              If <tt>immediate="true"</tt> at TABLE1, then a row selection event at TABLE1 is processed early at APPLY_REQUEST_VALUES phase and then processing goes directly to RENDER_RESPONSE phase, thus skipping data submission/validation from other components (e.g. from TABLE2).

              If <tt>immediate="false"</tt> (or if it this attribute is not set at all), then everything works fine (i.e. values entered in TABLE2 are submitted and validated by the corresponding business component when the user navigates to another row in TABLE1 and the navigation does not succeed if there are some problems with the values entered/modified in TABLE2).

              If you have set <tt>immediate="true"</tt> to TABLE1, please remove it and try the page again. However, if your problem is not related to the "immediate" attribute (e.g. you have not set <tt>immediate="true"</tt> to TABLE1, but you still experience the problem), then post your version of JDeveloper/ADF and post the start tags of both tables for further investigation.

              Dimitar
              • 4. Re: Partially submitting a form when selecting a table row
                vikram jit singh - oracle
                I got the problem. I was binding the table to a List<String> and binding each inputText to the contained String. Wrapping the String in a dumy class did the job.

                Thank you for the earlier solution to the main problem.