Details
Description
I'm setting up mappings for RESTful URLs including collection resources:
"/person/$id"(controller:"person"){ action = [GET:"show", PUT:"update", DELETE:"delete", POST:"save"] } "/person"(controller:"person") { action = [GET:"list", PUT:"update", DELETE:"delete", POST:"save"] }
So the URL for viewing a collection is like
myapp/person
instead of
myapp/person/list
However, the g:paginate tag won't work with this.
It creates links with "list" in the URL when there is no action name in the URL.
I changed this line in the paginate tag of RenderTagLib
def action = (attrs.action ? attrs.action : (params.action ? params.action : "list"))
to
def action = (attrs.action ? attrs.action : (params.action ? params.action : ""))
to get it to work for me.
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
Contegix Support
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Project Import | Thu Mar 24 21:22:24 CDT 2011 [ 1301019744151 ] |
Burt Beckwith
made changes -
| Workflow | jira [ 32299 ] | Grails [ 40302 ] |
Burt Beckwith
made changes -
| Workflow | Grails [ 40302 ] | Copy of Grails [ 47734 ] |
Burt Beckwith
made changes -
| Workflow | Copy of Grails [ 47734 ] | Grails [ 55144 ] |
Burt Beckwith
made changes -
| Workflow | Grails [ 55144 ] | Grails2 [ 62695 ] |
Burt Beckwith
made changes -
| Workflow | Grails2 [ 62695 ] | jira [ 74092 ] |
Burt Beckwith
made changes -
| Workflow | jira [ 74092 ] | Grails2 [ 82902 ] |
Peter Ledbrook
made changes -
| Last Reviewed | 01/Jan/10 |
Peter Ledbrook
made changes -
| Workflow | Grails2 [ 82902 ] | jira [ 91387 ] |
Peter Ledbrook
made changes -
| Workflow | jira [ 91387 ] | Grails2 [ 99572 ] |
Rick Jensen
made changes -
| Status | Open [ 1 ] | Edit [ 10000 ] |
| Description |
I'm setting up mappings for RESTful URLs including collection resources: {code} "/person/$id"(controller:"organization"){ action = [GET:"show", PUT:"update", DELETE:"delete", POST:"save"] } "/organization"(controller:"organization") { action = [GET:"list", PUT:"update", DELETE:"delete", POST:"save"] } {code} So the URL for viewing a collection is like myapp/person instead of myapp/person/list However, the g:paginate tag won't work with this. It creates links with "list" in the URL when there is no action name in the URL. I changed this line in the paginate tag of RenderTagLib def action = (attrs.action ? attrs.action : (params.action ? params.action : "list")) to def action = (attrs.action ? attrs.action : (params.action ? params.action : "")) to get it to work for me. |
I'm setting up mappings for RESTful URLs including collection resources:
{code} "/person/$id"(controller:"organization"){ action = [GET:"show", PUT:"update", DELETE:"delete", POST:"save"] } "/person"(controller:"person") { action = [GET:"list", PUT:"update", DELETE:"delete", POST:"save"] } {code} So the URL for viewing a collection is like myapp/person instead of myapp/person/list However, the g:paginate tag won't work with this. It creates links with "list" in the URL when there is no action name in the URL. I changed this line in the paginate tag of RenderTagLib def action = (attrs.action ? attrs.action : (params.action ? params.action : "list")) to def action = (attrs.action ? attrs.action : (params.action ? params.action : "")) to get it to work for me. |
| Last Reviewed | 01/Jan/10 | 12/Apr/12 |
Steve Tekell
made changes -
| Status | Open [ 1 ] | Edit [ 10000 ] |
| Description |
I'm setting up mappings for RESTful URLs including collection resources:
{code} "/person/$id"(controller:"organization"){ action = [GET:"show", PUT:"update", DELETE:"delete", POST:"save"] } "/person"(controller:"person") { action = [GET:"list", PUT:"update", DELETE:"delete", POST:"save"] } {code} So the URL for viewing a collection is like myapp/person instead of myapp/person/list However, the g:paginate tag won't work with this. It creates links with "list" in the URL when there is no action name in the URL. I changed this line in the paginate tag of RenderTagLib def action = (attrs.action ? attrs.action : (params.action ? params.action : "list")) to def action = (attrs.action ? attrs.action : (params.action ? params.action : "")) to get it to work for me. |
I'm setting up mappings for RESTful URLs including collection resources:
{code} "/person/$id"(controller:"person"){ action = [GET:"show", PUT:"update", DELETE:"delete", POST:"save"] } "/person"(controller:"person") { action = [GET:"list", PUT:"update", DELETE:"delete", POST:"save"] } {code} So the URL for viewing a collection is like myapp/person instead of myapp/person/list However, the g:paginate tag won't work with this. It creates links with "list" in the URL when there is no action name in the URL. I changed this line in the paginate tag of RenderTagLib def action = (attrs.action ? attrs.action : (params.action ? params.action : "list")) to def action = (attrs.action ? attrs.action : (params.action ? params.action : "")) to get it to work for me. |
Rick Jensen
made changes -
| Status | Edit [ 10000 ] | Open [ 1 ] |
Jeff Brown
made changes -
| Assignee | Bobby Warner [ bobbywarner ] |
Bobby Warner
made changes -
| Status | Open [ 1 ] | Closed [ 6 ] |
| Fix Version/s | 2.1 [ 12801 ] | |
| Resolution | Fixed [ 1 ] |