Question

I've got a list view and for each line I want a link to another list view showing the related results. The createlink line I've finally managed to construct looks like this

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

This generates the link

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

I know that testExecQueueInstance.id is 22 and I want the link to actually look like this

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

What am I missing?

The idea is that I then have a controller like so which should then list those items matching that id...

def ListSpecific(int id){

    render(view: "list", model: [runResultsInstanceList: RunResults.findAllByTestExeQueueID(id, [sort:"testExecTime", order: "desc"]), runResultsInstanceTotal: RunResults.count()])
}
Was it helpful?

Solution

You are using an apostrophe on map of params. You should try this.

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

enjoy.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top