hi everybody,
i am using a dataTable with multiple selection, that means each row has a checkbox. Additionally the dataTable is polling the db like every 2 seconds to get updates.
The issue that is occurring is that when a checkbox is selected , the selection is removed . Or other weird behavior that one checkbox is checked and going to check another one and the first one gets removed etc.
Is this behavior being caused by the polling of the db every 2 seconds? how could this be resolved?
any input would be welcoome
Thanks
sakal
multiple selection table with polling
Start by not using polling but push. And when an ajax 'selection' is being done while a push update is received, delay the processing of the push client-side and once the ajax selection is finished, do the update...
@kukeltje:
is there a concept in Primefaces called Push or a showcase that i could look at? And how can an ajax operation be delayed?
Additionally: does your answer mean that my assumption is correct that the selection is being influenced by the polling?
thanks
S
is there a concept in Primefaces called Push or a showcase that i could look at? And how can an ajax operation be delayed?
Additionally: does your answer mean that my assumption is correct that the selection is being influenced by the polling?
thanks
S
Did you check? Please do... Even using a simple searchengine would have provided this... Or the documentation...is there a concept in Primefaces called Push or a showcase that i could look at?
And yes it is influenced... Not the polling but the updating after the polling (updating after push will most likely yield the same result)
You push a 'signal' to the client in which you can initiate an update for a component. e.g. via a remoteCommand or by triggering a filter of the datatable or... But no, you cannot directly update a datatable initiated on the server. Stackoverflow has lots of related info.
And posting what you tried, searched, found etc is appreciated. Saves us 'guessing' or asking
And posting what you tried, searched, found etc is appreciated. Saves us 'guessing' or asking
@Kukeltje
the solution for the push and the delay when selection happening, could that not also be used for the poll? so that when there is a selection poll is being stopped clientside and continued after selection is done. Was looking at this post by Cagatay Civici:
https://cagataycivici.wordpress.com/201 ... rver-side/
what i tried so far: since my time is limited to solve this issue i did not want to make too big of code changes in the back end . So i tried things like ignoreAutoUpdate=true for poll but seems like those things do not help.
Thanks
the solution for the push and the delay when selection happening, could that not also be used for the poll? so that when there is a selection poll is being stopped clientside and continued after selection is done. Was looking at this post by Cagatay Civici:
https://cagataycivici.wordpress.com/201 ... rver-side/
what i tried so far: since my time is limited to solve this issue i did not want to make too big of code changes in the back end . So i tried things like ignoreAutoUpdate=true for poll but seems like those things do not help.
Thanks
-
- Information
-
Who is online
Users browsing this forum: No registered users and 44 guests