Server Side Processing

Server Side Processing

rmoullietrmoulliet Posts: 12Questions: 2Answers: 0

I've been trying to figure this out. I'm using SSP and request succeeds but returns and empty data array something to the like of this { "draw": 1, "recordsTotal": 6038, "recordsFiltered": 6038, "data": [] }. However, with the awesome developer tools of Chrome, I've discovered that the POST/GET (I've tried both) request sends a "length" value of NaN which does affect the data returned. Because of NaN, the Sql query with SSP is formulated with LIMIT 0, 0. HENCE NO DATA RETURNED. I'm trying to figure out what made length value of NaN. Any thoughts? I can attach only the DataTable call code. We have high security here at my facility.

Answers

  • rmoullietrmoulliet Posts: 12Questions: 2Answers: 0

    Nevermind. I discovered my error and fixed it! Sorry about that! I was debugging while I was waiting for an answer.

  • BrovertBrovert Posts: 2Questions: 0Answers: 0

    @rmoulliet, what was the solution for your problem? I'm running into this issue where the length is hitting the server with NaN. quite often. I have the grid inside a tab and then when the user switches to the tab, the behavior is inconsistent. Sometimes it returns Nan, sometimes it doesn't.

  • rmoullietrmoulliet Posts: 12Questions: 2Answers: 0

    I honestly cannot recall. I no longer use SSP because it did not meet mine and my company needs. I use strictly ajax now. SSP does not work well with the search feature, hence ajax.

  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin

    @Brovert - If you post a link to a test case showing the issue, I'll try to debug it.

    My guess is that you might have scrolling enabled with Scroller and the table is initialised hidden - but I can't say for sure.

    Allan

  • rmoullietrmoulliet Posts: 12Questions: 2Answers: 0

    That might be the issue. When I first started using DT, initializing the table while it was hidden caused me trouble no matter if what DT method I used (html, javascript, ajax, or SSP).

  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin

    So the issue with that setup is that there is no height for the table. Scroller can't perform its calculations.

    Having said that, there is code in there that should prevent the error occurring. If you have a test case link I would like to see it so I can debug it please.

    Allan

  • rmoullietrmoulliet Posts: 12Questions: 2Answers: 0

    As said I with my 1st reply, I solved the issue. No longer hide my tables. However can't speak for @Brovert. I suspect that to be his issue.

This discussion has been closed.