-
Notifications
You must be signed in to change notification settings - Fork 102
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
Multiple DataTables on the page cause error when paginating or filtering #285
Comments
…leProperties attribute is set. this is a quick fix commit so that the buck does not impact current users with multiple datatables
…ate the setter to explain this is still an experimental feature and yet lacks the ability to work when multiple data tables are on the same page.
Ok, pull request is in, but I'd request that this issue not be closed, as this is still an open bug and I'll still be searching for the actual solution to the root problem. The fix makes sure the error doesn't bubble up and break normal functionality with searching and stuff. |
… notation which breaks jquery selectors. since the wrapper for the datatable is generated from the true id of the datatable by the client-side framework, we must escape the ":" in the selector.
Ok, so I've had some more time to play with this bug. I first encountered it when testing the snapshot on a project at work that had multiple tables on the page. I've since masked that, but when I tried on a personal test project at home, the bug never actually happened! I think there must be some funny difference in a form on the page or something. So while testing having forms on the page, and DataTables in form, I encountered the same bug as #241. The rendering fix inside #272 uses a JQuery selector to select the wrapper that is generated for the DataTable. That wrapper gets its ID attribute from the TRUE DataTable ID. So when it's in a form it looks like I'm not entirely certain if this fixes the situation with the project at work, but I will verify that when I have a chance. I know I type a lot, but I find it important to document everything :) |
I've merged your pull request to the master branch of BootsFaces (i.e. BootsFaces 0.8.2-SNAPSHOT). I've also uploaded the new developer snapshot to Maven Central (see #151). If this solves the bug, feel free to close this issue. In any case, please report back. Thanks in advance |
I tested it with my work project and still haven't figured out what's causing it to fail in that particular project. There has to be something 'special' about that project. Has to be something with an errant form or something. I've spun up several different personal projects testing multiple tables and there are no issues. I'll keep investigating. In the meantime, if you want to just assign this ticket to me, or close this one and I can open another PR in the future if I find out the root cause to be something on the framework side. |
I'm going to close this issue as the core issue I have been unable to replicate the failures in new projects since the fix, and there must be some special circumstance with the codebase with which I initially discovered this issue. Any other projects out there that experience this bug will fail gracefully, and there will be errors in the JavaScript console. If you're somehow able to replicate this bug in a project, I guess you can reopen this ticket or create a new issue with exact information as how to produce the bug, and I'd be happy to fix it. |
@stephanrauh @TheCoder4eu
#279 Introduced a bug :(
I'm looking into the below stack trace, and seeing how the JSF tries to figure out the forms. Perhaps I've invoked the
BsF.ajax()
call incorrectly?This affects all pages with multiple DataTables on them whether or not they are using the new attributes.
In any case, I'd recommend either backing out the merge request #281 if you want to release any artifacts, or postponing any releasing of artifacts until I can complete one of these and get you to merge it into master:
BsF.ajax()
calls when thedataTableProperties
attribute is set. Explain that this iteration of the attribute is a feature-in-progress and only works with a single DataTable per-page.I'm continuing to investigate, and will get a quick-fix PR put together ASAP in order to mask the bug. Sorry for my carelessness, I can't believe I didn't test this sooner.
The text was updated successfully, but these errors were encountered: