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

StandardConfigurationLoader non string values bug #258

Closed
ztomic opened this issue Jul 3, 2014 · 3 comments
Closed

StandardConfigurationLoader non string values bug #258

ztomic opened this issue Jul 3, 2014 · 3 comments

Comments

@ztomic
Copy link

ztomic commented Jul 3, 2014

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());
}
@tduchateau
Copy link
Member

You're absolutely right. Reproduced.
Thanks a lot for this one!

@tduchateau tduchateau added this to the 0.10.1 milestone Jul 6, 2014
@tduchateau tduchateau self-assigned this Jul 6, 2014
@ztomic
Copy link
Author

ztomic commented Jul 7, 2014

No problem :)

tduchateau added a commit that referenced this issue Aug 23, 2014
The staging configuration was processed too early, introducing several bugs at runtime
Closes #257
Closes #258
@tduchateau tduchateau reopened this Sep 2, 2014
@tduchateau tduchateau modified the milestones: 0.11.0, 0.10.1 Sep 2, 2014
tduchateau added a commit that referenced this issue Sep 30, 2014
Configuration/options

 * ConfigToken has been renamed to Option to avoid collision with plain "configuration", such as Properties
 * All previous ConfigTokens from TableConfig and ColumnConfig have been gathered in a new DatatableOptions for an easier maintenance
 * Added a new OptionProcessingContext to hold all arguments needed during option processing and refactored all processor accordingly
 * All options have now a new precedence attribute, allowing to process a Option/value pair before another one.

General

 * Removed all integration tests from both datatables-jsp and datatables-thymeleaf cause they are now located in the dandelion-it module
 * Removed all customed RuntimeException and replaced them by the main DandelionException
 * Added loooots of comments

Dependencies

 * Cleaned up all POMs by removing all IT-related dependencies
 * Replaced FestAssert by AssertJ and updated all tests accordingly
 * Upgraded Thymeleaf to 2.1.3.RELEASE

Closes #254
Closes #258
Closes #261
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants