Illep
Illep

Reputation: 16851

Navigate to another view using action field

I have 3 View classes. They are Person, Animal and Building (These are 3 folders, and in each folder there's a view called show.gsp). From the Person view i want to navigate to the Animal view. How can i do it from the code below.

<td><g:link action="show" id="${rx.id}">${fieldValue(bean: rx, field: "name")}</g:link></td>

Upvotes: 0

Views: 55

Answers (1)

Igor Artamonov
Igor Artamonov

Reputation: 35951

You need to specify target controller also:

<g:link controller="animal" action="show" id="${rx.id}">${fieldValue(bean: rx, field: "name")}</g:link>

Upvotes: 1

Related Questions