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]
13 Answer(s)
-
0
Hi,
Can you share your controller code as well ? It seems like, there is a problem with list action definition of jTable.
-
0
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)
-
0
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.
-
0
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])
-
0
Hi,
Thanks for sharing your code. What do you see when you run this "abp.services.app.address.getAddresses" in your browser's console ?
-
0
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?
-
0
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
-
0
There are no references to "GetAddresses" method in the logs.txt file.
-
0
Hi,
Please share your project with us via <a href="mailto:[email protected]">[email protected]</a>, we will take a look at it.
Thanks.
-
0
I have emailed you the solution. Thanks!
-
0
Thanks.
-
0
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.
-
0
Thanks very much! Apologies for taking your time on this issue!
Sometimes one cannot see the forest due to the trees! :lol: