Här kan du läsa om aktiviteter/tips och funderingar om olika tekniker i Grails och Joomla.
Specifying request attribute in service integration tests
Today I ran into some problems when wanting to add request dependant tests to my integration test suite. The controller tests in grails are already mocked with MockHttpServletRequest, MockHttpServletResponse, and MockHttpSession , but what about services??
In my case I wanted the RequestContextHolder.getRequestAttributes()
to contain a 'request' so I could get the servername from that inside my session scoped service.
So what I did was:
def request = new MockHttpServletRequest(); request.setServerName("test2.localhost") RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request))
Artisteer plugin on grails repo
Artisteer plugin updated and can be downloaded at
(that is also the page for latest doc and info regarding this plugin)
New version of Grails Artisteer plugin released
The Grails artisteer plugin repository has been updated. The plugin is located at:
The plugin zip is also up to date, although it still has 0.1 as version number.
Ability to create layout templates based on a script instead of uploading to a controller
grails generate-artisteer-gsp-template [path\andname of file.zip]
And you will get the template in the layouts directory. It will have the same name as the filename without the '.zip' and always be 'version 0' when running from the script. When uploading with controller the version number will be the same as the template id that is stored in the database.
So now you can choose if you just want to generate some templates with this script or upload templates while application is running.
You can also customize footers/headers and menues for the template in the artisteer files that are generated when you start your application.
Senast uppdaterad (2011-03-25 14:22)
Grails cleanouts issues and how to resolve them
Sometimes your grails applications comes to a state where they don't refresh as they should. Just now I ran into an issue where adding new domain objects /controllers wouldnt make any difference when starting the application.
To clean out grails applications:
Grails performance vs php framework..
Check this article out! It shows php symphony vs Grails.. (please switch to Grails)
Senast uppdaterad (2011-01-16 20:46)