Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.3
-
Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ACE
-
Assignee Priority:P1
-
ICEsoft Forum Reference:
Description
As reported in the forum, these renderers use instance fields that they read from and write to during rendering:
- TextAreaEntryRenderer
- SliderEntryRenderer
- PanelRenderer
- DateTimeEntryRenderer
- CheckboxButtonRenderer
- CellEditorRenderer
A common pattern found in some of them is to use this code:
public class DateTimeEntryRenderer extends InputRenderer {
private Map<String, Object> domUpdateMap = new HashMap<String, Object>();
Which involves the encode methods using the domUpdateMap to create a hashcode. The domUpdateMap should be declared inside the methods, which might involve re-arranging code between the encodeBegin and encodeEnd methods.
Renderers are application scoped, and can be used simultaneously by different requests / lifecycles. They should never use instance fields that are written to and then read from during a discrete render, since the same Renderer instance is used across threads for different views and users.
We'll need to audit all of our ACE Renderers, as the forum posting might not have been comprehensive.
- TextAreaEntryRenderer
- SliderEntryRenderer
- PanelRenderer
- DateTimeEntryRenderer
- CheckboxButtonRenderer
- CellEditorRenderer
A common pattern found in some of them is to use this code:
public class DateTimeEntryRenderer extends InputRenderer {
private Map<String, Object> domUpdateMap = new HashMap<String, Object>();
Which involves the encode methods using the domUpdateMap to create a hashcode. The domUpdateMap should be declared inside the methods, which might involve re-arranging code between the encodeBegin and encodeEnd methods.
Renderers are application scoped, and can be used simultaneously by different requests / lifecycles. They should never use instance fields that are written to and then read from during a discrete render, since the same Renderer instance is used across threads for different views and users.
We'll need to audit all of our ACE Renderers, as the forum posting might not have been comprehensive.
Revision #36189
Committed by nils.lundquist
3 minutes ago
ICE-9348- Removed CellEditorRenderer state.