1 2 Previous Next 25 Replies Latest reply: May 8, 2014 6:13 AM by shiva_0004 RSS

    Apex 4.2: "Add Row" button not working in Tabular Form

    shiva_0004

      Hi,

       

          We have an application migrated from Apex 3.2 to 4.2

       

           After which "Add Row" button is not working. When I try to click that, new row is not getting added.

       

           I have even tried deleting the tabular form and created a new tabular from in Apex 4.2 environment itself, but no use, new row is not getting added.

       

           Also, is throwing some page error "Message: 'length' is null or not an object"

       

           Have browsed few of the previous posting in OTN for this issue, and found that by switching theme this issue can be resolved.

       

           'Length' is null or not an object error for Tabular Forms V4

       

           Apex 4: "Add Row" Button not working in a Tabular Form

       

           User is comfortable with the current theme, and doesnt want to change theme.

       

           Current theme being used is "Blue Gray - 13".

       

           Is it by any patch or workaround we will be able to make "Add Row" button work normal.

       

           Kindly guide me in this issue. Thanks in advance.

       

       

      Regards,

      Shiva

        • 1. Re: Apex 4.2: "Add Row" button not working in Tabular Form
          TexasApexDeveloper

          So if you look at the button (add row button) what is the action that is supposed to occur upon click?

           

          Normally the button would be setup to do the following:

           

          Action: Redirect to URL

          URL Target: javascript:apex.widget.tabular.addRow();

           

          Does your setup have the same code??

           

          Thank you,

           

          Tony Miller
          LuvMuffin Software
          Ruckersville, VA

          • 2. Re: Apex 4.2: "Add Row" button not working in Tabular Form
            shiva_0004

            Hi Tony,

             

                 Thanks for reply.

                

                 The setup are the same.

             

            Action: Redirect to URL

            URL Target: javascript:apex.widget.tabular.addRow();

             

                 Same setup code is available, but still new row is not getting added.

             

                 But, throwing some page error "Message: 'length' is null or not an object". This error message is coming in the browser and not as popup.

             

             

            Regards,

            Shiva

            • 3. Re: Apex 4.2: "Add Row" button not working in Tabular Form
              shiva_0004

              Hi all,

               

                  Can anyone help me out in this....?

               

              Regards,

              Shiva

              • 4. Re: Apex 4.2: "Add Row" button not working in Tabular Form
                Tom Petrus

                Can you try to execute these steps:

                - Run the page

                - View the source (usually right click > view page source)

                - Do a search on the page search for "tabular.init"

                You should get a result similar to this:

                apex.widget.tabular.init("R37969610604197806966",{"beforeRow": (... omitted)

                (what does it look like with you?)

                - Copy the first parameter, eg in this example R37969610604197806966

                Use developer tools (In Chrome, Firebug in FF, don't use IE) and run this in the console:

                $("#R37969610604197806966")
                

                (where "R37969610604197806966" would be the string you copied from tabular.init in the previous step..

                 

                What does it return?

                 

                - If it returned something, can you try to run

                $x_FormItems( $x( "R37969610604197806966" ) ).length
                

                 

                Again, substituting "R37969610604197806966" with the earlier copied value.

                What does it return?

                • 5. Re: Apex 4.2: "Add Row" button not working in Tabular Form
                  shiva_0004

                  Hi Tom Petrus,

                   

                      Thank you very much for helping me out in this.

                   

                      As mentioned, I took the first parameter value.

                   

                      You have mentioned like I need to take that parameter value and run the same in console, but when i click on the console tab, it is showing below error message,

                   

                   

                  Uncaught TypeError: Cannot read property 'length' of undefined widget.tabular.min.js?v=4.2.2.00.11:1

                   

                  event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

                   

                      Kindly guide me on how I go about beyond this....?

                   

                  Thanks & Regards,

                  Shiva

                  • 6. Re: Apex 4.2: "Add Row" button not working in Tabular Form
                    HarryF

                    If you want to try to retain the original template you could make a separate app with just this page with a new template and confirm it corrects the problem. You could then look at the templates used in the page and compare and see if you can find the missing elements. Make backups if you mess with templates.

                    • 7. Re: Apex 4.2: "Add Row" button not working in Tabular Form
                      shiva_0004

                      Hi Tom,

                       

                           As mentioned by you tried to run the given scripts substituting the respective ID values.

                       

                           Got the below output,

                       

                       

                      $("#R1367360000093249141")

                      null

                       

                      $x_FormItems( $x( "R1367360000093249141" ) ).length

                      ReferenceError: $x_FormItems is not defined

                       

                       

                      Regards,

                      Shiva

                      • 8. Re: Apex 4.2: "Add Row" button not working in Tabular Form
                        shiva_0004

                        Hi Harry,

                         

                             Tried creating the page in a new application with new theme and its working fine.

                         

                             Then tried comparing the two, by viewing the page source, below are the two,

                         

                        Below HTML is there in application where Add Row is not working,

                         

                        <table summary="" cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td align="right"><input type="button" onclick="javascript:apex.widget.tabular.addRow();" value="Add Row" class="t13Button" /></td></tr></table>

                         

                         

                        Below HTML is there in application where Add Row is working fine,

                         

                        <table summary="" cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td align="right"><a href="javascript:apex.widget.tabular.addRow();" class="uButton " id="B4726506736607492role="button"><span>Add Row</span></a> </td></tr></table>

                         

                             Kindly guide me on this...!

                         

                             I even tried exporting and importing the template from a bug free environment to the environment where Add Row button is not responding. Still its not working.

                         

                         

                        Regards,

                        Shiva

                        • 9. Re: Apex 4.2: "Add Row" button not working in Tabular Form
                          HarryF

                          The problem is there is javascript behind the themes, this is not just a visual issue. Trying to resolve it this way would be very difficult. If it is working with a new theme then I think you should push the user to accept a new theme.

                          • 10. Re: Apex 4.2: "Add Row" button not working in Tabular Form
                            Tom Petrus

                            Hi Shiva,

                            running $("#R1367360000093249141") should've returned the region. If it didn't it means that the region has a template which is not putting out an ID. Can you check your region template for the tabular form, and if and how it puts out an id for the region. If it does not, try adding one. Right now the issue is most likely to be javascript not being able to locate the form and its items because of it. jQuery not selecting anything returns no error, but of course as soon as code tries to interact with the supposedly returned object, such as .length, you'll get errors.

                            • 11. Re: Apex 4.2: "Add Row" button not working in Tabular Form
                              shiva_0004

                              Hi Tom,

                               

                                   Thank you very much for your extended support on this issue.

                               

                                   Really sorry for the delayed reply.

                               

                                   I had a check on the application as mentioned by on your previous thread, and both the script when run in the console were returning values.

                               

                                   I am unable to copy the text and also unable to upload the screenshot taken. Hence, have uploaded the same in apex.oracle.com.

                               

                                   Below is the URL,

                               

                                   URL: https://apex.oracle.com/pls/apex/f?p=76592:1

                               

                                   Please have a check on the output given when running the script in console in google chrome.

                               

                              Regards,

                              Shiva

                              • 12. Re: Apex 4.2: "Add Row" button not working in Tabular Form
                                Jeff E

                                Shiva,

                                 

                                Edit the report template.  In the Before Rows field you will have the table tag with an id attribute like:

                                 

                                id="#REGION_STATIC_ID#"

                                 

                                Change it to be:

                                 

                                id="report_#REGION_STATIC_ID#"

                                 

                                --Jeff

                                • 13. Re: Apex 4.2: "Add Row" button not working in Tabular Form
                                  shiva_0004

                                  Hi Jeff,

                                   

                                       Thank you very much for your support.

                                   

                                       Before rows is having content as below,

                                   

                                  <div id="report#REGION_ID#"><htmldb:#REGION_ID#><table cellpadding="0" cellspacing="0" class="t13Standard"  border="0" summary="" id="#REGION_ID#">

                                  <tbody>

                                   

                                       Please let me know what change needs to be done here....?

                                   

                                  Regards,

                                  Shiva

                                  • 14. Re: Apex 4.2: "Add Row" button not working in Tabular Form
                                    Jeff E

                                    Try:

                                     

                                    <div id="report#REGION_ID#"><htmldb:#REGION_ID#><table cellpadding="0" cellspacing="0" class="t13Standard"  border="0" summary="" id="report_#STATIC_REGION_ID#">

                                    <tbody>

                                     

                                    If that doesn't work let me know how all the fields are set in the template and I'll try to recreate it on my end.

                                    1 2 Previous Next