grails / scaffolding

Scaffolding plugin for Grails® framework
Apache License 2.0
15 stars 23 forks source link

Installed View Templates Still Not Being Processed... #22

Open KymPohl opened 8 years ago

KymPohl commented 8 years ago

It looks like this issue is still present in the coordination between Grails 3.1.4 and the Scaffolding plugin 3.2.1. After running install-templates and subsequently modifying src/main/templates/scaffolding/index.gsp, such changes do not show up in the generated index.gsp file after running generate-views .

salehmamdouh1984 commented 8 years ago

Can I ask on which version of Grails this bug was introduced ? I am using Grails 3.0.11. Also, I am thinking that if I want to use Grails framework, it could be good thing to fix its bugs myself..

As I can see, this bug has been waiting her for 10 days without being resolved. And according to what I understand, this is a very very crucial, it basically blocks everything and anything.

I think if will be using Grails, I should be able to solve these buys myself. Any clues on where to start from the Grails source code ? At least at startup guide on the tools that I am advised to use in order to run and compile it ...... ...... .... .... .... ... ....

graemerocher commented 8 years ago

I can't reproduce this in Grails 3.1.8, works fine to me

salehmamdouh1984 commented 8 years ago

@graemerocher Thx for your reply. Can you please see Grails Detailed Scaffolding #26 if my issue was a result of this bug. Thx

KymPohl commented 8 years ago

I am the original issuer of this potential bug. @graemerocher, in response to your comment that this feature seems to function fine in your environment, I just tried this again in my environment and it still appears not to be picking up the customized templates. I'm using Grails 3.1.10 and scaffolding 3.2.1 . Also, just to be concise, I'm attempting to use the 'static scaffolding' feature (not dynamic) in that I'm modifying the gsp template files (after installing them) and then issuing 'generate-views ', which according to the docs should be picking up the gsp templates in src/main/templates/scaffolding. However, when I inspect the generated index.gsp file it is based on the original template, not the one I've modified and placed in src/main/templates/scaffolding. And although a considerable amount of customization can be achieved via the 'fields customization' capability (which I'm certainly making use of), my use case needs to modify aspects of the view apart from the rendering of model objects.

jameskleeh commented 8 years ago

I can't reproduce this

Grails 3.1.10 Win 10 JDK 1.8_66 Scaffolding 3.2.1

Steps:

  1. install-templates abc.Domain
  2. modify show.gsp drastically
  3. generate-all abc.Domain
  4. view the modified /grails-app/views/domain/show.gsp
KymPohl commented 8 years ago

Schlogen, I re-verified just now (using 'generate-all' as you did) and my modified template (i.e., src/main/templates/show.gsp) is still not affecting what is generated. Apart from my env specs I stated above I am using IntelliJ IDEA, although I can't imagine that it is throwing any kind of wrench in the mix. This is a touch one... I'm wondering if perhaps any other users reading this issue, could you please try this in your env's and post whether or not your templates fact what is generated...

jameskleeh commented 8 years ago

@MauiMana My advice is to try with a fresh project

jeffscottbrown commented 8 years ago

See the project at https://github.com/jeffbrown/issue15.

Notice the change I made to the template at https://github.com/jeffbrown/issue15/blob/d90cb2c3169068626ff8a522a7a032dd09ec89e5/src/main/templates/scaffolding/index.gsp#L21

When I generate scaffolding, that change shows up at https://github.com/jeffbrown/issue15/blob/d90cb2c3169068626ff8a522a7a032dd09ec89e5/grails-app/views/person/index.gsp#L21