How can I invoke a service directly from a view? I’m trying with ${my.domain.service.method}, but it complains it can’t find the property.
And no, I don’t want to use a controller because the view is a template.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
And then you can call
${myService.method()}in your gsp viewBe aware that calling transactional service methods from views hurts performance. Better to move all your transactional service method calls to the controller (if you can)