Improve create/reload bindings situation#1
Closed
ogf wants to merge 4 commits intoLibrePlan:masterfrom
ogf:master
Closed
Improve create/reload bindings situation#1ogf wants to merge 4 commits intoLibrePlan:masterfrom ogf:master
ogf wants to merge 4 commits intoLibrePlan:masterfrom
ogf:master
Conversation
…in OrderModel" This reverts commit 7ca0d43.
Sometimes reloadBindings is called several times in the same request. Now only the first call would force the reload and the others would be ignored. For example, when switching to Projects List reloadBindings is called after the tab being created and another time when calling org.libreplan.web.orders.OrderCRUDController.goToList(). Now the second call is ignored.
A mechanism for ignoring in a scope the calls to createBindings has been added. When accessing from the entry point the page is been created and the AnnotatedDataBinder created automatically will track the created tab. So in this case we must ignore createBindings calls.
When entering in the details of a order or an order element withing from an entry point, the bindings must not be created.
Contributor
Author
|
I didn't test a98bb2a but I think entering the order details or an order element details is subject to the same problem as the project list and to the same solution. |
Contributor
|
I've tested your patches however they break the project creation pop-up. And maybe they also break other windows. It seems a bit dangerous only reload bindings once, as maybe in some windows it's really needed to reload them again after some changes. But, maybe I'm just wrong. Anyway, the patches cannot be applied at this moment. Thanks. |
Contributor
Author
|
I'll take a look at that issue. |
This was referenced Feb 27, 2018
This was referenced Feb 27, 2018
Closed
Too much initializations for OrderModel when a project is created or Project list it's invoked
#1734
Closed
kwoot
pushed a commit
that referenced
this pull request
Jun 4, 2018
Create vertical scroll bar on global dashboard
kwoot
added a commit
to kwoot/libreplan
that referenced
this pull request
Apr 2, 2026
…ePlan#1) from add-build-jdk25 into main Reviewed-on: http://forgejo.dsg.lan/LibrePlan-Enterprise/libreplan-mistral-vibe-cli/pulls/1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now I track in a per request basis which components have already been asked to be reloaded. This avoided a spurious reload of
getOrderswhen using the tab button.For when entering from an entry point, I've solved the issue using dynamic scope, i.e., via a
ThreadLocal. Thus we avoid to complicateITabinterface.The strategy we've talked about, detecting if the binder is present, cannot be used because the binder is added after all the page is composed. When adding the tab it hasn't been composed yet.
An alternative would be to detect if the page is being composed for the first time, i.e., loaded from an URL versus a subsequent event. I didn't find an easy way. One option could be to install a listener as explained here. Another would be to pospone the creation of the bindings using
Events#postEventso that the binder added by zk is added at that time.