6

The only templates I can get in Grails 3 with install-form-fields-templates are create.gsp and edit.gsp from the fields-plugin.

Is there any chance to install and use again the old ones with _form.gsp?

The fields plugin is not in build.gradle. So is it now part of the grails-core and only possibility?

Thanks!

saw303
  • 6,313
  • 2
  • 42
  • 68
rawi
  • 401
  • 3
  • 13
  • If you want to use the fields plugin with Grails 3 you need to use this version https://github.com/grails3-plugins/fields – Dónal Feb 09 '15 at 17:01
  • 1
    The `fields` plugin is not in `build.gradle` but it is present as a transitive dependency of the `scaffolding` plugin – Graeme Rocher Feb 09 '15 at 21:41
  • 3
    Firstly I would deactivate fields if possible. Fields-scaffolding gives me "" so I need to write all fields by hand. The former scaffolding gave me already all fields with g: tags in _form.gsp and I had only to rearrange them on the page. Can I reactivate this work flow? – rawi Feb 10 '15 at 10:49
  • No but fields is very flexible and you can render each property individually instead of using if you want – Graeme Rocher Feb 20 '15 at 08:27
  • Thank you very much. Then I'll try to write a _form.gsp template with the fields-plugin based on the old logic of _form.gsp. I hope for all of us that you and all the team will be able to keep the excellent work despite difficulties. Kudos – rawi Feb 22 '15 at 15:37
  • 1
    @GraemeRocher Graem, loving grails 3. 3.0.4 is a great step forward but I would agree with the OP here I too found _form template quite useful and was easier for me to make change once and apply for all my forms. Moreover with ever evolving fields plugin it's hard to keep pace with it. There should be a way for us to keep using older scheme which I can't seem to use even when I copied the older templates from Git – Sap Aug 11 '15 at 05:41
  • 1
    Hey, did you end up using the fields plugin. Everytime I start a new project it seems like a lot of efforts to add fields manually to my JSP when all I want to do is remove a couple of fields and re arrange the labels etc to be compatible with bootstrap or materialize. For instance the first domain class in my current version has 18 attributes out of which I do not want 4 and want to change order of labels. This would have been really easy with _form @GraemeRocher – Sap Dec 16 '15 at 13:31
  • @Sap: No. Being stuck in another day's jobs, I had to postpone learning Grails:( – rawi Dec 17 '15 at 15:58
  • But I'll resume it in the next weeks. I remember, that the last plan back in February was to let Fields create a page and then take from the html source each widget and position it at the right place in the _form, replacing the value with the call to the proper instance, fieldValue etc. May be there are now more easy examples with Fields? I have to check it again – rawi Dec 17 '15 at 16:07
  • Hey @rawi ever got the chance? – Sap Dec 30 '15 at 08:58
  • 1
    @GraemeRocher this is a real issue, imagine a class with 20/30 different properties. And if we are using materialise or bootstrap. First We have to create _wrapper.gsp for each type because label and input order is different then auto generated code. Then `` is of no use so we have to add each field individually anyways. While the field plugin is a great demo feature is it also as useful in production. For instance in my student form all fields are 12 columns wide excluding first name and last name which are 6 columns wide. To handle such scenario _form template was a blessing. – Sap Dec 30 '15 at 11:03
  • @rawi I am trying to create template which can generate individual fields. While I know I can iterate through all the properties of a domain class I am not sure how to get hold of fully qualified domain name in /templates/scaffoling/create.gsp. Any ideas? – Sap Dec 30 '15 at 11:07

0 Answers0