It's fairly complex so I'm doing all of it server side through a
service. I'm now in a quandary as to how to get this string down to
the actual JavaScript.
I'm sure I'm missing something obvious, but here's what I have:
_uservoice.gsp - which has a variable token I can push into it from a controller
TokenGeneratorService - which builds up the token from the current
logged in user and encodes that to send it back to the UserVoice site
when the feedback button is clicked.
I don't like that this requires that for every page I want this on I
need to add this service call and add the 'token' variable to the
model being passed down to the render.
Can anyone see a better way to do this?
-warner
class MyFilters {
def myService
def filters = {
addUserVoiceStuffToModel(controller: '*', action: '*') {
after = { model ->
model?.userVoiceStuff = myService.getUserVoiceStuff()
}
}
}
}
--
You received this message because you are subscribed to the Google Groups "Grails Startup Support Group" group.
To post to this group, send email to grails-startup...@googlegroups.com.
To unsubscribe from this group, send email to grails-startup-suppo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/grails-startup-support-group?hl=en.
-warner
-warner
On Sun, Feb 27, 2011 at 4:15 PM, Warner Onstine <war...@gmail.com> wrote: