Skip to content

Support rendering stream of fragments #33194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rstoyanchev opened this issue Jul 10, 2024 · 0 comments
Closed

Support rendering stream of fragments #33194

rstoyanchev opened this issue Jul 10, 2024 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@rstoyanchev
Copy link
Contributor

In addition to the ability render multiple fragments added in #33162, htmx and turbo also support rendering fragments over SSE and WebSocket. This is issue is to explore such support.

@rstoyanchev rstoyanchev added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Jul 10, 2024
@rstoyanchev rstoyanchev added this to the 6.2.0-M6 milestone Jul 10, 2024
@rstoyanchev rstoyanchev self-assigned this Jul 10, 2024
@snicoll snicoll modified the milestones: 6.2.0-M6, 6.2.0-M7 Jul 18, 2024
rstoyanchev added a commit that referenced this issue Jul 24, 2024
@jhoeller jhoeller added the type: enhancement A general enhancement label Jul 30, 2024
rstoyanchev added a commit that referenced this issue Aug 8, 2024
Thymeleaf has its own special handling for SSE that gets in the way
of fragment rendering. This is why we need to set the response
content-type before streaming, and then pass text/html to the
View for rendering each fragment.

See gh-33194
rstoyanchev added a commit that referenced this issue Aug 9, 2024
Based on feedback from htmx-spring-boot. It's more generally useful
to process those from within DefaultFragmentsRendering rather than
in ModelAndViewMethodReturnValueHandler. That way a custom
return value handler can create a FragmentsRendering as well and
get the same result.

See gh-33194
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants