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
Improve (simplify) Primefaces (Ajax) / Bootstrap interaction #7565
Comments
So, I opened this issue because I tried an experiment that worked! I think it needs some more testing / refinement, but something of it's nature should eliminate the need to include In
around the That said, @mheppler are a little unsure if why it works, as we weren't sure if the document.ready would or should get called when that part of the page us updated. So it would be good to understand better why this is working and make sure there's no harm in calling other aspects. (in doing some other research, there's another thing i want to try and will report back on shortly. |
OK, tried the other thing I had found: But it did not seem to work as I expected. More experimentation to be done, especially with the first solution, which seems to work. |
I keep seeing things like: In the experiment above, though, we are effectively redefining the document.ready by updating the part of the page that contains it, and that does trigger it to fire. But I have yet to find any agreement (or disagreement) that this is an ok approach. That said, I may have found a more "accepted" way. Omnifaces has an I tried it, and it seems to work as well; just added:
to the dataset_template.xhtml (and removed the bind call from the documnet.ready). |
So to be clear, I think this issue is ready to be worked on: |
Lots to clean up...
Found some inventory documents (doc, spreadsheet) that might be able to help track the various features, across all the pages. |
Related code clean up Infrastructure Spring Cleaning - Remove misc files #5348. |
Added first official use of
|
|
Keeping this assigned to me and in the project because the linked PR does not update all of the pages in the app. |
Talked to @sekmiller. The pilot is done and merged and he plans to work on the rest so we reopened this issue. |
With Bootstrap, we do a lot of "binding" of html elements, with javascript, e.g. tooltips or popup previews for image files. This is done by calling a JS function
bind_bsui_components
when we ready the document.With Primefaces, we do a lot of ajax calls that update parts of pages - when that happens the bootstrap binding is lost. This is because the update replaces the html, but doesn't know to call the rebinding.
We currently solve this by calling the javascript for each update with
oncomplete="bind_bsui_components"
This is prone to error, because we have to remember to put it everywhere.
The text was updated successfully, but these errors were encountered: