Details
-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-4.3.0.GA_P04
-
Fix Version/s: EE-4.3.0.GA_P05
-
Component/s: ACE-Components
-
Labels:None
-
Environment:Any
-
Support Case References:Support Case 14726
-
Workaround Exists:Yes
-
Workaround Description:
Description
If an ace:dataTable instance contains values from a bundle loaded via icecore:loadBundle, whenever there's a dynamic update on the table markup the values loaded from the bundle disappear. The dynamic updates can be either a change in sort order, a change in a filter string, page navigation via the paginator, etc. An easy way to reproduce the issue is to display the name of a header from a bundle message and trigger a dynamic update on the table.
The messages from the bundle should be rendered normally, like any other text, when there are dynamic updates on the table.
The messages from the bundle should be rendered normally, like any other text, when there are dynamic updates on the table.
Activity
Arturo Zambrano
created issue -
Arturo Zambrano
made changes -
Field | Original Value | New Value |
---|---|---|
Assignee | Arturo Zambrano [ artzambrano ] |
Arturo Zambrano
made changes -
Fix Version/s | EE-4.3.0.GA_P05 [ 14073 ] |
Arturo Zambrano
made changes -
Workaround Description | Specify ace:ajax events for the type of events where this problem was observed and specify that the icecore:loadBundle should be executed in the request, e.g. <ace:ajax event="sort" execute="myLoadBundleID @this" /> in ace:dataTable. | |
Workaround Exists | Yes [ 10007 ] |
Arturo Zambrano
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Added a SystemEventListener to apply the bundle specified by icecore:loadBundle to the view even if the component doesn't get executed, as long as it's in the component tree.
The problem was in icecore:loadBundle and not in ace:dataTable, although it wasn't exactly a bug, because icecore:loadBundle has a different design than f:loadBundle. The difference is that f:loadBundle is a tag handler, while icecore:loadBundle is a component. The advantage of icecore:loadBundle is that it's dynamic, meaning that its attributes can change dynamically, and the changes can be applied on the page dynamically as well, without having to reload the page. However, it gets treated like any other component. This means that it will only load the bundle if it gets executed or rendered in the view. The default behaviour of ace:dataTable ajax events is to only execute and render the table itself. That's why the bundle loaded by icecore:loadBundle wasn't actually loaded in those requests and the messages appeared empty.
This was fixed in a rather unconventional way. When the icecore:loadBundle component object is created, it will subscribe a SystemEventListener to be called after the state has been restored. Then, when this listener is called, the bundle specified by this component instance will be loaded. So, as long as this component is in the component tree, it will load its bundle. After loading the bundle the listener will be removed, to avoid accumulating listeners. Other necessary checks are done before loading the bundle to make sure that it is only applied to the view where the component is declared.
This fix should be tested more thoroughly before the next release, to make sure it works in all situations and doesn't create other bugs.
For now, the workaround is to declare ace:ajax events (for the cases where this problem was seen) and specify the icecore:loadBundle component to be executed in the request.