Easygrid icon indicating copy to clipboard operation
Easygrid copied to clipboard

Upgrade to grails v3?

Open peterna opened this issue 9 years ago • 14 comments

Hi Tudor,

Any timeframe on an upgrade to Grails version 3?

Easygrid is great!

peterna avatar Jun 23 '15 21:06 peterna

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

Easygrid is great!

sebDK avatar Jun 30 '16 05:06 sebDK

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

atasc avatar Aug 26 '16 16:08 atasc

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

sebDK avatar Aug 30 '16 06:08 sebDK

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

atasc avatar Aug 30 '16 07:08 atasc

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.

sebDK avatar Aug 30 '16 11:08 sebDK

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

jsturnio avatar Oct 21 '17 17:10 jsturnio

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.

wayco avatar Nov 26 '17 04:11 wayco

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

sebDK avatar Nov 27 '17 07:11 sebDK

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.

ericraskin avatar Apr 24 '18 15:04 ericraskin

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.

wayco avatar Apr 24 '18 17:04 wayco

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                                                                     [email protected]

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

-----Original message----- From: wayco [email protected] Sent: Tuesday, April 24, 2018 1:55 PM To: tudor-malene/Easygrid [email protected] Cc: Eric Raskin [email protected]; Comment [email protected] 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.

 

ericraskin avatar Apr 24 '18 18:04 ericraskin

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.

wayco avatar Apr 25 '18 00:04 wayco

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                                                                     [email protected]

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

-----Original message----- From: wayco [email protected] Sent: Tuesday, April 24, 2018 8:31 PM To: tudor-malene/Easygrid [email protected] Cc: Eric Raskin [email protected]; Comment [email protected] 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.

 

ericraskin avatar Apr 25 '18 13:04 ericraskin

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!

haryl avatar May 09 '18 15:05 haryl