cfxram/grails-dojo — Issue #22: Make sure the ID property for the <dojo:grid> component refers to the domain id.
Author: cfxram
Created: 2011-10-29 15:24:21+00:00
State: open

Change the ID property to refer to the domain object id like all other grails tags.

Add a "Name" property that will become the grid objects DOM id.

Original Request from Jackson Chen

> Hi, Rob,
>
> I am trying to use your DOJO plugin for Grails, http://grails.org/plugin/dojo
> Now for the grid tag,
> I found that I can't get object id in controller,
> so I dig into the source code, I found that this is maybe a issue.
> In GridTaglib.groovy file, I just moved one line to top , then solved this issue.
>
> def grid = {attrs, body ->
> def href = attrs.remove("href") ?: g.createLink(attrs) //moved to top by Jackson
> def id = attrs.remove("id") ?: "dojo_ui_grid${Util.randomId()}"
> def storeId = attrs.remove("storeId") ?: "${id}_store"
> //move href to Top by Jackson
> //def href = attrs.remove("href") ?: g.createLink(attrs)
> def max = attrs.remove("max") ?: 1000
>
> FYI.
>
> Thanks.
> Jackson
>