tudor-malene / Easygrid

Grails plugin - simple and declarative way of defining a DataGrid
Apache License 2.0
27 stars 24 forks source link

Upgrade to grails v3? #154

Open peterna opened 9 years ago

peterna commented 9 years ago

Hi Tudor,

Any timeframe on an upgrade to Grails version 3?

Easygrid is great!

sebDK commented 8 years ago

Hi Tudor, Any news about the upgrade? I am about to try to start to do it.

Easygrid is great!

atasc commented 8 years ago

Hi sebDK, did you manage to upgrade Easygrid to Grails 3?

sebDK commented 8 years ago

Hi @atasc,

I did not success in upgrading this plugin. I got a talk with Burt about the blocking issue I met (I can explain you later if you want to take your chance) and the conclusion was to find an other component like grid from angularJS to replace it. But I think that angularJS grid does not equal easygrid. Please, let me know what is your plan.

BR,

Sébastien

atasc commented 8 years ago

Hi sebDK, yes please can you explain what has blocked you? Can you post your code?

sebDK commented 8 years ago

Hi @atasc .

The blocking issue I met is here. registerMapping method does not exist anymore with Grails 3 http://docs.grails.org/3.1.6/api/org/codehaus/groovy/grails/commons/GrailsControllerClass.html http://docs.grails.org/2.5.0/api/org/codehaus/groovy/grails/commons/GrailsControllerClass.html

S.

jsturnio commented 7 years ago

Hi sebDK, I got the same result that you, trying to migrate the Easygrid plugin. I am blocked with the registerMapping method that does not exist anymore. I saw that scaffolding plugin version 2.X used registerMapping, now the new version is not using that, I have to check what kind of solution was applied.

Jose

wayco commented 6 years ago

I'm responsible for upgrading a Grails 2 app that features extensive use of this plugin. With 95+ grid implementations, "find a different plugin for grids" is impractical and is my last resort at the moment.

I think that the absence of registerMapping can be effectively solved using Trait injection. Our traits must be annotated with @grails.web.Action. Then, the defined trait(s) are easily injected into any Controller artefact featuring the @Easygrid annotation. We can define a trivial grails.compiler.traits.TraitInjector to do so.

The injected methods are little more than calls to the backing EasygridService, and so there's relatively little coding involved. Finally, I changed controller method names such that instead of [gridName]Rows we're invoking something like 'gridRows' and passing the grid identifier as a parameter.

There may be other problems with the plugin and this might be a "naive" solution, but I'm going with it for now.

sebDK commented 6 years ago

@wayco it sounds really cool. Great work ! Maybe you could post your upgrade when you are finished.

ericraskin commented 6 years ago

Was this ever completed? Is the code available somewhere? I am now stuck in the same boat - trying to convert a Grails 2 app with EasyGrids to Grails 3.

wayco commented 6 years ago

While "completed" is a subjective term...at least IMO...I do have it working for our purposes. I haven't had a chance to publish the code but will make an effort to do so as soon as I can. I should note that we're using jqGrid exclusively and don't really try to leverage everything the Easygrid plugin was designed to do, so there's a very good chance that outside those boundaries, you'll find deficiencies that I didn't bother with nor do I have any intention of addressing. But I'm definitely willing to publish the revised code.

Give me a day or so.

ericraskin commented 6 years ago

Thank you.  I am willing to give it a try. ;-)


Eric H. Raskin                                                                                                      914-765-0500 x120

Professional Advertising Systems Inc.                                                                 914-765-0503 fax

200 Business Park Drive Suite 304                                                                     eraskin@paslists.com

Armonk, NY 10504                                                                                              http://www.paslists.com

-----Original message----- From: wayco notifications@github.com Sent: Tuesday, April 24, 2018 1:55 PM To: tudor-malene/Easygrid Easygrid@noreply.github.com Cc: Eric Raskin eraskin@paslists.com; Comment comment@noreply.github.com Subject: Re: [tudor-malene/Easygrid] Upgrade to grails v3? (#154)

While "completed" is a subjective term...at least IMO...I do have it working for our purposes. I haven't had a chance to publish the code but will make an effort to do so as soon as I can. I should note that we're using jqGrid exclusively and don't really try to leverage everything the Easygrid plugin was designed to do, so there's a very good chance that outside those boundaries, you'll find deficiencies that I didn't bother with nor do I have any intention of addressing. But I'm definitely willing to publish the revised code.

Give me a day or so.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

 

wayco commented 6 years ago

Revised Easygrid code at https://github.com/wayco/easygrid-g3. I was going to create an example but am running short on time...

The main difference in the consumer will be that the way you define the grid closures in your Controller has changed a little bit. There is now a "root" closure, and you don't want to append "Grid" to your grid definitions. For example:

static grids = {
    test {   
            ........
    }

    test2 {   
            ........
    }
}

HTH someone.

ericraskin commented 6 years ago

Thanks.  I will give it a shot/


Eric H. Raskin                                                                                                      914-765-0500 x120

Professional Advertising Systems Inc.                                                                 914-765-0503 fax

200 Business Park Drive Suite 304                                                                     eraskin@paslists.com

Armonk, NY 10504                                                                                              http://www.paslists.com

-----Original message----- From: wayco notifications@github.com Sent: Tuesday, April 24, 2018 8:31 PM To: tudor-malene/Easygrid Easygrid@noreply.github.com Cc: Eric Raskin eraskin@paslists.com; Comment comment@noreply.github.com Subject: Re: [tudor-malene/Easygrid] Upgrade to grails v3? (#154)

Revised Easygrid code at https://github.com/wayco/easygrid-g3. I was going to create an example but am running short on time...

The main difference in the consumer will be that the way you define the grid closures in your Controller has changed a little bit. There is now a "root" closure, and you don't want to append "Grid" to your grid definitions. For example:

static grids = { test {
........ }

test2 {   
        ........
}

}

HTH someone.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

 

haryl commented 6 years ago

I also have ported easygrid to grails v.3 https://github.com/xtradesoft/easygrid Pls be aware that this version just works for jqgrid, I do not have tested any other impl. Pls threat this as version 0.1 pull requests for fixes are welcome!