-
Notifications
You must be signed in to change notification settings - Fork 13
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
Provide samples with "Groovy" TLDs #3
Comments
Many of these tag libraries are unfortunately tied into Grails specific APIs around URL mappings (to controllers and actions) and domain classes. Since Spring Boot doesn't have a standard "domain model" or a URL Mapping infrastructure to reverse generated links from routes these kinds of tags will simply not work with Spring Boot alone :( |
Thanks for the reply. Being able to use additional GSP taglibs seems like it would greatly enhance the user experience. I wonder what it would take for Spring MVC to support such an API. What do you think @rstoyanchev ? |
@rwinch You can obviously use the existing Spring JSP tag libraries, but it may well be worth considering building out a set of standard GSP tag libraries for Spring Boot. The Boot team would need to drive that though as I don't know what tags are needed necessarily... |
Would it be worth while trying to provide Spring MVC APIs around URL mappings that you mention? Are there other limitations in using Grails taglibs with standard Spring? |
@rwinch Could be worthwhile yeah. In Grails we have: Which is what is needed. Other limitations are a standard API around what is the domain model (classes, properties, associations). In Grails we have this. See Which allows you to write tag libraries like the "fields" one you mentioned, for auto generating forms from the domain model. |
Sorry for noticing this late. It's actually quite relevant to 4.1. The latest code in master has support for associating names with @RequestMapping methods and the MvcUriComponentsBuilder than allows you reverse engineer the link from its name. See https://jira.spring.io/browse/SPR-5779 for details. The strategy for assigning names is pluggable. |
Great, so we can maybe get better GSP tag library coverage in Spring 4.1. But isn't it possible to use some taglibs out of the box (the ones that don't need that metadata I guess)? Maybe there aren't any useful ones. |
@dsyer There are several useful ones that useable like It is just anything that relies on Grails specific APIs |
Many users trying GSPs with boot will be doing so for the first time. One of GSPs strengths is the extensive TLD definitions. For those that are not new to Grails, integrating with Boot will certainly be new. It would be real cool to see an example of using some of the TLD extensions. A few tags that come to mind are:
<f:all bean="person"/>
<g:paginate controller="book" action="list" total="${bookCount}" />
Please keep in mind that I am not a Grails expert, so these libraries are simply suggestions. The point is to demo some of the coolest GSP libraries out there.
Not knowing the code internals I suppose it is possible some libraries will not work with Boot. I think trying to ensure (or work towards) the entire ecosystem is available will be very valuable.
The text was updated successfully, but these errors were encountered: