Hi,How to call a function defined in a controller in its interceptor in grails 3?
--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/c0ac05a7-feca-49cb-8359-853faebe4dcb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You could find the bean instance of your controller and call the method defining the function.Something like this:MyController controller = applicationContext.getBean(MyController)controller.callMyFunction()Best regards / Med venlig hilsen,Søren Berg Glasius
Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.
On Mon, 26 Nov 2018 at 13:11, Joud Kassem <joud.k...@gmail.com> wrote:
Hi,--How to call a function defined in a controller in its interceptor in grails 3?
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-discuss+unsub...@googlegroups.com.
You could find the bean instance of your controller and call the method defining the function.Something like this:MyController controller = applicationContext.getBean(MyController)controller.callMyFunction()Best regards / Med venlig hilsen,Søren Berg Glasius
Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.
On Mon, 26 Nov 2018 at 13:11, Joud Kassem <joud.k...@gmail.com> wrote:
Hi,--How to call a function defined in a controller in its interceptor in grails 3?
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-discuss+unsub...@googlegroups.com.
Is it possible to get a bean instance from a controller? I'm getting that the bean is not available!
On Monday, November 26, 2018 at 1:22:45 PM UTC+1, Søren Berg Glasius wrote:
You could find the bean instance of your controller and call the method defining the function.Something like this:MyController controller = applicationContext.getBean(MyController)controller.callMyFunction()Best regards / Med venlig hilsen,Søren Berg Glasius
Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.
On Mon, 26 Nov 2018 at 13:11, Joud Kassem <joud.k...@gmail.com> wrote:
Hi,--How to call a function defined in a controller in its interceptor in grails 3?
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/c0ac05a7-feca-49cb-8359-853faebe4dcb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/316f8465-0d6c-49c5-90fe-8ab1c6d14ab7%40googlegroups.com.
What are you actually trying to archive? The question is, if you would be better off having the method you need to call in a service instead, and then inject that service.
Best regards / Med venlig hilsen,
Søren Berg Glasius
Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.
On Mon, 26 Nov 2018 at 15:10, Joud Kassem <joud.k...@gmail.com> wrote:
Is it possible to get a bean instance from a controller? I'm getting that the bean is not available!
On Monday, November 26, 2018 at 1:22:45 PM UTC+1, Søren Berg Glasius wrote:
You could find the bean instance of your controller and call the method defining the function.Something like this:MyController controller = applicationContext.getBean(MyController)controller.callMyFunction()Best regards / Med venlig hilsen,Søren Berg Glasius
Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.
On Mon, 26 Nov 2018 at 13:11, Joud Kassem <joud.k...@gmail.com> wrote:
Hi,--How to call a function defined in a controller in its interceptor in grails 3?
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-discuss+unsub...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/c0ac05a7-feca-49cb-8359-853faebe4dcb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-discuss+unsub...@googlegroups.com.