9 Replies Latest reply: Nov 11, 2010 10:36 AM by Marc Sewtz RSS

    Tabular Form Problem

    48920
      I've created a page with both a Form and a Tabular form. I have several validations for the tabular form, if I add a standard validation for my standard form I get a problem with the validation of the tabular form. i.e. when I submit the page and get a validation error on my tabular form I lose all the values defined for the row I tried to add. I can see the following error in firebug

      *"Syntax error, unrecognized expression: #"*

      If I look at the source of the page I can see the folloiwng javascript which looks like the source of the problem, i.e. the null values. (I have 3 validations defined for my standard form)
          var vErrItems = new Array ('f03_0001', 'f05_0001', 'f06_0001', 'f08_0001', 'f09_0001', 'f10_0001', 'f11_0001', 'f12_0001', '', '', '');
      As soon as I remove my standard form validations the problem goes away.

      Seems to me like a bug?

      Version: Application Express 4.0.1.00.03
        • 1. Re: Tabular Form Problem
          48920
          Is raising a SR the only way to get this looked at? Anyone else experience this?
          • 2. Re: Tabular Form Problem
            Arie Geller
            Hello,

            >> If I look at the source of the page I can see the folloiwng javascript which looks like the source of the problem, i.e. the null values.

            The specific JavaScript statement in your post is perfectly legal (I just tested a similar one). A null value is a legitimate JavaScript array member value.

            >> Is raising a SR the only way to get this looked at?

            If you really want to speed up things, you should try to reconstruct the problem on apex.oracle.com. It will allow people to check the possible problem more easily (including members of the development team, which should confirm first that there is a bug).

            Raising a SR is always a legitimate option. Just bear in mind that if you suspect a bug, it will always be forward to the development team, and the first thing they need to do is to reconstruct the situation. Therefore, building an appropriate example on apex.oracle.com can speed things up either way.

            Regards,
            Arie.

            -------------------------------------------------------
            ♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.

            ♦ Author of Oracle Application Express 3.2 – The Essentials and More
            • 3. Re: Tabular Form Problem
              48920
              Thanks Arie much appreciated, I'll get on to reproducing the problem. In future I'll follow your advice before posting.
              • 4. Re: Tabular Form Problem
                771908
                Hi. Is there any update on this? I too am experiencing the same problem. Will work on replicating my app in apex.oracle.com
                But i find that the firebug error mentioned by mattno also appears whenever the "Add Row" button is clicked following a page being returned due to normail item validation failure.
                my tabular form has been constructed by the wizard and I am using APEX 4.0.1
                Cheers, D.

                **UPDATE**
                for an example of the problem I am encountering please see the sample app I have setup on apex.oracle.com
                http://apex.oracle.com/pls/apex/f?p=41496
                If you add 1, 2 or 3 rows and only fill in the data for one field on each row and then click submit, the validation works as expected. However, if you don't change anything and click submit again, the tabular form validation fails to capture the errors and the page is submitted firing off an error with the MRU process.

                Edited by: daveh on 03-Nov-2010 14:35
                • 5. Re: Tabular Form Problem
                  771908
                  Bump
                  • 6. Re: Tabular Form Problem
                    Marc Sewtz
                    Hi,

                    Looks like there are two different issues being discussed in this thread. One issue is with tabular form validations, when also having a standard form with standard validations on the same page. This does sound like a bug, but I haven't been able to reproduce this yet. So if someone could put a test case on apex.oracle.com, I'd be happy to see what's going on there.

                    The other issue is with validations when adding new rows to a tabular form, this works initially, but after a failed validation, and after having the tabular form re-rendered, when you then submit the tabular form again, it looks like the new rows are no longer validated. I have filed a bug for this, and will look into it.

                    Regards,
                    Marc
                    • 7. Re: Tabular Form Problem
                      Arie Geller
                      Hi Mark,

                      Thanks for looking into it.

                      Although I’m not the OP I believe I was able to recreate a similar error situation, for the first case, in the following:

                      http://htmldb.oracle.com/pls/otn/f?p=22710:790

                      Please leave the Regular Form items as null; add a new row to the tabular form, fill up at least one column but leave the Sal column empty; submit the page.

                      This scenario creates validation errors on both the Regular Form and the Tabular Form. The content of the newly added line is not preserved (as with only a Tabular Form validation error) and my browser throws the following error message:
                        
                      Webpage error details
                      
                      User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; BTRS87832; GTB6.6; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; InfoPath.3; .NET4.0C; Tablet PC 2.0)
                      Timestamp: Thu, 11 Nov 2010 11:43:00 UTC
                      
                      
                      Message: Exception thrown and not caught
                      Line: 75
                      Char: 399
                      Code: 0
                      URI: http://htmldb.oracle.com/i/libraries/jquery/1.4.2/jquery-1.4.2.min.js
                      Hope this helps.


                      Regards,
                      Arie.

                      -------------------------------------------------------
                      ♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.

                      ♦ Author of Oracle Application Express 3.2 – The Essentials and More
                      • 8. Re: Tabular Form Problem
                        48920
                        Thanks Arie for posting the demo, apologies I've been meaning to do this, I've just been too busy.

                        I implemented AJAX form validation to work around the problem.

                        As for the javascirpt array that I originally posted I meant to point out that when I say it's the source of the problem I should have been a little clearer. That array posted is the array of validation items for the tabular form. The extra three null values were my standard form item validations. So my theory is that the code which builds this array isn't ignoring valiadations for form elements which don't belong to the tabular form, and this is why we are getting the errors. As this is the only difference that I can see in the page source between when the standard form validations exist and the tabular form validation is broken and when I remove them and the tabular form validation works.

                        FYI Marc, the username/password on the demo link provided by arie is "demo/demo".

                        Cheers
                        Matt
                        • 9. Re: Tabular Form Problem
                          Marc Sewtz
                          Arie, Matt,

                          Thanks for the additional info and test case, I'll look into it and will let you know what I can find out,

                          Regards,
                          Marc