-
-
Notifications
You must be signed in to change notification settings - Fork 953
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
Decouple grails-plugin-controllers from Sitemesh #13624
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about creating a org.grails.plugins.web.controllers.SitemeshConstants
class to encapsulate these values. This approach makes their context more explicit when used throughout the codebase.
It’s only 2 properties. I was hoping for a more general location outside of the controllers plugin that has definitions for other things. If it is going to live under controllers, it can stay in the plugin definition class |
I think it's OK in the plugin controller. There were not many great locations outside of the controller plugin. This was about the best I saw looking through 30-40 with constants. grails-core/grails-web-common/src/main/groovy/grails/util/GrailsWebUtil.java Lines 46 to 48 in 272f48e
|
looks like those constants are only used in that class. |
Since |
Thats fine, I just wonder if we then could name them |
The |
Are all those constants related? |
yeah, that would make sense after we confirm final location for them. |
ok, so this rabbit hole just got a little deeper. It looks like this variable was also defined in another location. I found the new home. WebUtils.java |
Fixes #13623 - These changes make controllers independent of Sitemesh
Moved these attributes from ResponseRenderer.groovy
to ControllersGrailsPlugin.groovy
Any recommendations for a different location?