[MAGNOLIA-4990] Rendering listeners - 4.5 Created: 24/Apr/13  Updated: 01/Jun/15  Resolved: 06/May/13

Status: Closed
Project: Magnolia
Component/s: rendering
Affects Version/s: None
Fix Version/s: 4.5.9

Type: Improvement Priority: Neutral
Reporter: Roman Kovařík Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by MAGNOLIA-5001 Listeners for execution of actions be... Closed
dependency
is depended upon by MAGNOLIA-4126 Direct area rendering - 4.5 Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

We need some logic to be done before/after call of renderer for direct area rendering implementation, see MAGNOLIA-4126. Although we have tried several places where it can be done, we agreed on usage of listeners, see DAR review II.
Such set of listener is called before/after every call of render and we can reuse listeners in the future for different purposes (for example push/pop actions can be called in appropriate listeners).

  • Register such listener in rendering engine config (RenderingContext).
  • New instance of such listener per request.
  • Registering of multiple listeners is possible.
  • Listener is registered and instantiated by rendering engine and passed into rend. context.


 Comments   
Comment by Jan Haderka [ 30/Apr/13 ]
  • Since you call after() before pop() I think you should call also before() only after push() to ensure the same order of inclusion.
  • Each of the listeners can fail, so you should actually call each of them in the loop in separate try/catch block and just list exception if one of them fail.
  • while we push/po variation or definition depending on what exists, listener seems to be always called just with the definition. Why? Should not those two calls be in sync?
Comment by Roman Kovařík [ 02/May/13 ]

Add configuration for registering listeners.

Comment by Roman Kovařík [ 06/May/13 ]
  • ConfiguredRendererManager.reload() tries to instantiate all content nodes under configuration/moduleName/renderer as Renderer - including renderer/listeners. This causes logging of unnecessary instantiation exception.
    -> renderer/listeners node has to be excluded.
Generated at Mon Feb 12 04:00:56 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.