Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server-side processing with json-plugin (no MVC) not working #320

Open
Kaspatoo opened this issue Jun 22, 2017 · 1 comment
Open

server-side processing with json-plugin (no MVC) not working #320

Kaspatoo opened this issue Jun 22, 2017 · 1 comment

Comments

@Kaspatoo
Copy link

Hi,

when using json-plugin because use of struts instead of MVC then eithere data or pagination is not printed correctly.

At first the "DatatablesResponse.build" cannot be used because jsonplugin then creates a response like
{"datatablesResponse":
{
"data":[{...}],
"draw":1,
"recordsFiltered":500,
"recordsTotal":2591
}
}

and because of the prefix datatablesResponse no data is printed and pagination also is not working.

When creating a reponse by hand such that its like this:
{
"data":[{...}],
"draw":1,
"recordsFiltered":500,
"recordsTotal":2591
}

Then the data is shown but pagination does not work properly:

"Zeige 1 bis 500 von 500 Eintr�ge (filtered from 2,591 total entries)"

Due to this, paging only shows one single page.

When adding deferLoading:
<datatables:table id="users" url="/user_User_Json_List_Dandelion.action" serverSide="true" deferLoading="2500">

then its showing no data at all:
"No matching records found"
and
"Zeige 1 bis 500 von 2,500 Eintr�ge"

Is it a bug or a missing feature? Meas is server side processing only implemented for usage of MVC and does not support others like strus json-plugin?
Basically I'd expect to have a clear interface where the information comes from the json webserver and datatables then is rendering it.

@Kaspatoo
Copy link
Author

changed my mind:
I misused "recordsFiltered":500,
should be set to the total amound of data provided over all pages (here 2500 since thats our desired maximum of overall elements)

But using pipelining and deferLoading still do not work
While pipelining seems to have no effect (every paging a new request is done), page 5 does take the same time to load like page 2 when setting pagesize to e.g. 3.
DeferLoading causes still to see no matching records in the list but saying there were about 2500 records available on paging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant