Closed ztomic closed 10 years ago
StandardConfigurationLoader loads all values as strings in userConf, so if for e.g. global.ajax.serverSide is set to true in datatables.properties and table does not have dt:serverSide="true" then ClassCastException is thrown in AjaxSourceProcessor.
(https://github.com/dandelion/dandelion-datatables/blob/master/datatables-core/src/main/java/com/github/dandelion/datatables/core/configuration/StandardConfigurationLoader.java#L267)
As temporary fix I'm using changed StandardConfigurationLoader with following change at line 267 (only for ajax.serverSide):
if (configToken.getPropertyName().endsWith("ajax.serverSide")) { userConf.put(configToken, Boolean.valueOf(entry.getValue() + "")); } else { userConf.put(configToken, entry.getValue().toString()); }
You're absolutely right. Reproduced. Thanks a lot for this one!
No problem :)
Raised in: http://dandelion-forum.48353.x6.nabble.com/v0-10-1-ajax-serverSide-true-lt-Boolean-Parse-Exception-td1660.html And in: http://dandelion-forum.48353.x6.nabble.com/v0-10-0-ClassCastException-when-global-ajax-pipelining-is-set-to-true-tp1504p1647.html
StandardConfigurationLoader loads all values as strings in userConf, so if for e.g. global.ajax.serverSide is set to true in datatables.properties and table does not have dt:serverSide="true" then ClassCastException is thrown in AjaxSourceProcessor.
(https://github.com/dandelion/dandelion-datatables/blob/master/datatables-core/src/main/java/com/github/dandelion/datatables/core/configuration/StandardConfigurationLoader.java#L267)
As temporary fix I'm using changed StandardConfigurationLoader with following change at line 267 (only for ajax.serverSide):