task #4338: [MASTER] Handle abbreviated title and protected cache correctly in TaxEditor
Fields set to irrelevant for cache should be set by state only
follow up from #3737
Currently this is not yet the case as they are set during UI update by calling refresh only on certain fields and depending on the place in code where the update was triggered.
#4 Updated by Andreas Müller about 1 month ago
This is mostly fixed. Some advanced features stay:
- trigger updateCacheRelevance() with ToggledText state change listener (probably this is the SelectionListener)
- improve handling of team members in Team element. (by setting a breakpoint somewhere at TeamMemberElement creation it becomes clearer how to insert registration
- improve colors
- handle also for other DetailElements like Collection detail element
- improve use of ICacheRelevantFormElement in class hierarchies (probably the use can still be reduced)
- implement RefType dependency (mostly of abbrevTitleCache) in ReferenceDetail view (also depending on cache strategy)
- Very advanced: use cache strategy to define which fields are relevant
#6 Updated by Andreas Müller about 1 month ago
- Status changed from In Progress to Resolved
- Assignee changed from Andreas Müller to Katja Luther
- % Done changed from 0 to 50
#8 Updated by Andreas Müller about 1 month ago
The general idea of the refactoring is:
- in a first step all elements which are relevant for a cache get do register the cache the depend on.
- when the caches change the updateCacheRelevance() method is triggered for all such elements (this is currently still done with a cascading call, but better we should use a state change listener on the toggle/cache field (#9417) in future to make it all still more state dependend.
- each cache field has a registered color (CacheRelevance), so if 2 different cache fields exist, it can be indicated by color for which cache the field is irrelevant (or for both with 3rd color)
- fields only indirectly irrelevant (e.g. uninomial for an unprotected namecache but a protected titleCache) use a light color
- as the relevant elements and sections do not all inherit from the same base classes a helper class CacheRelevanceHelper exists which handled typical method calls (decorator pattern)