You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, when Thymeleaf generates a stream of SSE events, these events have the names:
head: for all markup that appears in the template before the iteration of the data-driver variable.
message: for each of the messages containing an iteration on the data-driver (actually an execution of the template engine for a buffer of elements produced by the data-driver).
tail: for all markup that appears in the template after the iteration of the data-driver variable.
But it would be a good idea to allow these event names (field event:) and also the event IDs (field id:) to be prefixed for a specific data-driven execution.
This way, if Thymeleaf is used in UI composition scenarios in which a large Flux<DataBuffer> is created as the composition of several executions of SpringWebFluxTemplateEngine (each of them creating a Flux<DataBuffer> for a specific data driver), so that these executions are not ordered in source but instead serve their DataBuffers towards the browser as soon as they are generated, we could have the different parts of a complex UI being rendered progressively and concurrently in HTML, and sent to the browser in the form of SSE events, which would then be very easy to discriminate in JavaScript by means of using EventSource objects with different callbacks being executed for each of the {prefix}_message events being received.
The text was updated successfully, but these errors were encountered:
Right now, when Thymeleaf generates a stream of SSE events, these events have the names:
head
: for all markup that appears in the template before the iteration of the data-driver variable.message
: for each of the messages containing an iteration on the data-driver (actually an execution of the template engine for a buffer of elements produced by the data-driver).tail
: for all markup that appears in the template after the iteration of the data-driver variable.But it would be a good idea to allow these event names (field
event:
) and also the event IDs (fieldid:
) to be prefixed for a specific data-driven execution.This way, if Thymeleaf is used in UI composition scenarios in which a large
Flux<DataBuffer>
is created as the composition of several executions ofSpringWebFluxTemplateEngine
(each of them creating aFlux<DataBuffer>
for a specific data driver), so that these executions are not ordered in source but instead serve theirDataBuffer
s towards the browser as soon as they are generated, we could have the different parts of a complex UI being rendered progressively and concurrently in HTML, and sent to the browser in the form of SSE events, which would then be very easy to discriminate in JavaScript by means of usingEventSource
objects with different callbacks being executed for each of the{prefix}_message
events being received.The text was updated successfully, but these errors were encountered: