Quantcast

No way to pass variable for reverse url mappings to remoteFunction !

classic Classic list List threaded Threaded
2 messages Options
SN
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

No way to pass variable for reverse url mappings to remoteFunction !

SN

Let say I have a url mappings

"blog/$year/$month/$day" (controller:'blog')

There's no way that I can pass the values for $year, $month and $day to remoteFunction so that it generates the proper url.
without variables, default rule would match and generated url would be like "/controller/action" I know i can pass the params to remoteFunction - so incoming url will match the rule, but how about reverse url mappings - that is used to generate the url for the ajax endpoint.
 
   
Sudhir 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: No way to pass variable for reverse url mappings to remoteFunction !

janusz.slota
This post has NOT been accepted by the mailing list yet.
There is a way:

// in URLMappings
name blog: "blog/$year/$month/$day" (controller:'blog')

//in your view files
<g:link mapping="blog" params="[ year: val, month: val, day: val ]">link</g:link>
Loading...