Insert values โ€‹โ€‹into grail createlink options when creating a page

I have a list view, and for each row I want a link to another list showing related results. The createlink line that I was finally able to build looks like this:

<a href="${createLink(controller : 'RunResults', action:'ListSpecific', params:'[id:testExecQueueInstance.id]')}">my link</a> 

This creates a link.

 http://localhost:3278/FARTFramework/runResults/listSpecific/testExecQueueInstance.id 

I know that testExecQueueInstance.id is 22, and I want the link to really look like

 http://localhost:3278/FARTFramework/runResults/listSpecific/22 

What am I missing?

The idea is that I then have a controller that should then list those elements that match this id ...

 def ListSpecific(int id){ render(view: "list", model: [runResultsInstanceList: RunResults.findAllByTestExeQueueID(id, [sort:"testExecTime", order: "desc"]), runResultsInstanceTotal: RunResults.count()]) } 
+6
source share
1 answer

You are using an apostrophe on the parameter map. You must try this.

 <a href="${createLink(controller : 'RunResults', action:'ListSpecific', params: [id:testExecQueueInstance.id])}">my link</a> 

to use.

+16
source

Source: https://habr.com/ru/post/953774/


All Articles