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

Inconsistent capitalization of pdfRenderingService #29

Open
micronax opened this issue Mar 17, 2016 · 2 comments
Open

Inconsistent capitalization of pdfRenderingService #29

micronax opened this issue Mar 17, 2016 · 2 comments

Comments

@micronax
Copy link

When importing the service in a controller the service needs to be named PdfRenderingService but when using in the controller action it must be pdfRenderingService

class SystemController {
    def PdfRenderingService

    def compose_one_for() {
        if (!params?.id) params.id = 1
        def customer = Customer.findById(params.id)
        pdfRenderingService.render(template: "/pdfs/firstLetter", model:[customer:customer], response)
    }
}

When changing the capitalization of pdfRenderingService in one case it wont work.

@yvesf
Copy link

yvesf commented Apr 5, 2016

Check the 'RenderingTrait' class. The variant pdfRenderingService is automatically injected.
In your example PdfRenderingService serves no purpose.

@micronax
Copy link
Author

micronax commented Apr 5, 2016

When I remove this line, I get a NullPointer exception... Using grails 3.0.4

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

No branches or pull requests

2 participants