Skip to content
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

Spring ViewResolver for HtmlFlow #54

Open
fmcarvalho opened this issue Jan 23, 2020 · 2 comments
Open

Spring ViewResolver for HtmlFlow #54

fmcarvalho opened this issue Jan 23, 2020 · 2 comments

Comments

@fmcarvalho
Copy link
Member

Regarding the sample spring application https://github.com/xmlet/spring-petclinic already integrated with HtmlFlow, enhance it with a ViewResolver. This resolver must obey with the strongly typed approach of HtmlFlow and avoid String to map views.

@benzen
Copy link
Contributor

benzen commented Nov 24, 2020

I'm not sure that we need to provide a way to use a ViewResolver.

To me it feels liberating that we don't need all the bells and whistles from spring mvc.
Simply calling render seems perfect to me.

Of course a description of how to implement it will be very helpfull

@fmcarvalho
Copy link
Member Author

I think that we do not need the ViewResolver when routes return a String corresponding to the path of a view. Others need that because their views are text files in a resource folder. But HtmlFlow views are Java types that take advantage of static compilation.

Yet, there are some use cases where routes return directly a ModelAndView or even an object T of model and the view is inferred from the path request. For those cases the ViewResolver may be useful.

Nevertheless it has low priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants