Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Index view - JTable error #2276


User avatar
0
exlnt created

I copied an existing Index page from my ABP application that works perfectly. I simply changed the entity name, service name and updated the columns in the JTable grid layout. My controller codes looks exactly the same as the working page code. Yet when this new page runs and you view the index page, it renders fine, but the JTable "Loading" never stops and it never reaches my app service method to get the data. When I look the console in Chrome I see the below error. Can someone please tell me why this error is happening and how to resolve?

[attachment=0:3q3y4tki]Screenshot (25).png[/attachment:3q3y4tki]

Thanks!


13 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Can you share your controller code as well ? It seems like, there is a problem with list action definition of jTable.

  • User Avatar
    0
    exlnt created

    Here is my controller code: [https://drive.google.com/file/d/0BzbrPy41GhA4a18tYUN2TkVFWEU/view?usp=sharing])

    Here is the JS error:

    TypeError: Object doesn't support property or method 'method'
       at Anonymous function (http://localhost:6240/Abp/Framework/scripts/libs/abp.jtable.js:53:21)
       at Deferred (http://localhost:6240/libs/jquery/jquery.min.js:2:29021)
       at self.options.actions.listAction (http://localhost:6240/Abp/Framework/scripts/libs/abp.jtable.js:45:17)
       at _reloadTable (http://localhost:6240/libs/jquery-jtable/jquery.jtable.min.js:36:103)
       at Anonymous function (http://localhost:6240/libs/jquery-ui/jquery-ui.min.js:6:7939)
       at load (http://localhost:6240/libs/jquery-jtable/jquery.jtable.min.js:34:478)
       at Anonymous function (http://localhost:6240/libs/jquery-ui/jquery-ui.min.js:6:7939)
       at load (http://localhost:6240/libs/jquery-jtable/jquery.jtable.min.js:124:3)
       at Anonymous function (http://localhost:6240/libs/jquery-ui/jquery-ui.min.js:6:8911)
       at each (http://localhost:6240/libs/jquery/jquery.min.js:2:2876)
    
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @exlnt,

    I asked for your client side code where you use jtable, sorry it is my mistake, I couldn't make it clear. Can you share it as well.

    Thanks.

  • User Avatar
    0
    exlnt created

    Here you go:

    JS [https://drive.google.com/file/d/0BzbrPy41GhA4clQxYW9tRDkyWDg/view?usp=sharing])

    HTML [https://drive.google.com/file/d/0BzbrPy41GhA4dWJpVXljdXR2YlU/view?usp=sharing])

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Thanks for sharing your code. What do you see when you run this "abp.services.app.address.getAddresses" in your browser's console ?

  • User Avatar
    0
    exlnt created

    Here you go... [https://drive.google.com/file/d/0BzbrPy41GhA4d18xSmJZQlJkRUk/view?usp=sharing])

    It does not appear to even make the call to the address method?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Probably the problem is related to your app service method. It seems like, It's proxy is not generated for your getAddresses method.

    Can you check your Logs.txt file and see if there is an error message about this

  • User Avatar
    0
    exlnt created

    There are no references to "GetAddresses" method in the logs.txt file.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Please share your project with us via <a href="mailto:[email protected]">[email protected]</a>, we will take a look at it.

    Thanks.

  • User Avatar
    0
    exlnt created

    I have emailed you the solution. Thanks!

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Sometimes, looking the source code helps a lot :). The problem is, method definition in app service interface is commented out, because of that javascript proxy is not generated. Uncommenting it should solve the problem.

  • User Avatar
    0
    exlnt created

    Thanks very much! Apologies for taking your time on this issue!

    Sometimes one cannot see the forest due to the trees! :lol: