Limitation of dynamic scaffolding

105 views
Skip to first unread message

Silvio Wangler

unread,
Jul 14, 2014, 9:22:29 AM7/14/14
to grails-de...@googlegroups.com
Hello,

I recently learned that dynamic scaffolding has some limitations and does not
  • display more than 6 properties of a domain class in the index view (listing)
I would like to discuss and find out whether this limitation is known and acceptable and how you guys work with scaffolding. In general installing the templates is not my favourite option since it makes my plugin upgrade process more complicated when it comes to upgraded to future versions of the plugin.

Hard limit of 6 properties in the list view

In my option it is wrong to have a hard limit of 6 properties per domain class in the index.gsp. I'd rather prefer to have a way to configure this value (e.g. define the value in the Config.groovy or maybe even define it in each domain class).

I am also willing to contribute a feature like this. But first I'd like to get some feedback. What do you thing about it?

Kind regards
Silvio

Jeff Scott Brown

unread,
Jul 14, 2014, 11:48:23 AM7/14/14
to grails-de...@googlegroups.com


On July 14, 2014 at 8:22:31 AM, Silvio Wangler (silvio....@gmail.com) wrote:
> Hello,
>
> I recently learned that dynamic scaffolding has some limitations
>
> and does not
>
> - display more than 6 properties of a domain class in the index view
> (listing)
>
> I would like to discuss and find out whether this limitation is known and
> acceptable and how you guys work with scaffolding. In general installing
> the templates is not my favourite option since it makes my plugin upgrade
> process more complicated when it comes to upgraded to future versions of
> the plugin.
>
> *Hard limit of 6 properties in the list view*
>
> In my option it is wrong to have a hard limit of 6 properties per domain
> class in the index.gsp. I'd rather prefer to have a way to configure this
> value (e.g. define the value in the Config.groovy or maybe even define it
> in each domain class).
>
> I am also willing to contribute a feature like this. But first I'd like to
> get some feedback. What do you thing about it?
>
> Kind regards
> Silvio


I suppose that if there were an option to configure the limit without having to install the templates then some folks would use it.  The reason it hasn’t been a big issue is the dynamic scaffolding isn’t used a whole lot for real development and for the cases where it is, folks usually end up customizing the templates for 1 reason or another anyway.  



JSB


Jeff Scott Brown
jbr...@gopivotal.com

Find The Cause ~ Find The Cure
http://www.autismspeaks.org/


Silvio Wangler

unread,
Jul 14, 2014, 12:34:17 PM7/14/14
to grails-de...@googlegroups.com
Hello Jeff

I agree. If you need to customize the view you will usually end up by installing the templates.

In my case I have plenty of admin pages that are generated by using dynamic scaffolding. These views are only visible to 'non customers' and therefore the default look and feel is just perfect.

In order to tweak this little behaviour is made the following pull request. It would be kind if you could review it and give me some feedback. The implementation is backward compatible, so no one is affected in a negative way.

Kind regards
Silvio




--
You received this message because you are subscribed to a topic in the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grails-dev-discuss/QcppzK9f0cg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/etPan.53c3fbc5.643c9869.8b6a%40JSB-MBP-August-2012.local.
For more options, visit https://groups.google.com/d/optout.

Iván López

unread,
Jul 17, 2014, 1:10:33 PM7/17/14
to grails-de...@googlegroups.com
Hi Silvio,

If you are interested in an admin interface for your grails application, some of my co-workers at Kaleidos have created this plugin: http://grailsadmininterface.kaleidos.net/

You can configure for each table which fields to show for the lists, edits, shows,... And you can extend it with your own widgets. In the page there's also a link for a demo application.

If you can check it we'll appreciate some feedback.

Regards, Iván.



--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.

To post to this group, send email to grails-de...@googlegroups.com.

Erik Pragt

unread,
Jul 19, 2014, 6:42:52 AM7/19/14
to grails-de...@googlegroups.com
Hi Ivan,

This plugin looks nice. However, some questions:
- Why is the one to many for conference to speaker a radio box, and not a select box?
- Why is the date filter collapsed, even when it's a mandatory field showing errors? It took me a while to find out why the conference wouldn't be saved, but there was a 'hidden' date range giving errors.
-The 'New' buttons don't work? Adding a new speaker, a new talk, etc?
- Pagination is broken? (it always shows 0, but clicking on it does nothing. For screens with 10+ items, the only way to go the next screen is by pressing the next icon, not the page number. 

Erik
To unsubscribe from this group and all its topics, send an email to grails-dev-discuss+unsub...@googlegroups.com.

To post to this group, send email to grails-de...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-discuss+unsub...@googlegroups.com.

To post to this group, send email to grails-de...@googlegroups.com.

Alonso Javier Torres Ortiz

unread,
Jul 19, 2014, 11:06:58 AM7/19/14
to grails-de...@googlegroups.com
Hello,

I'm one of the developers of the Grails Admin plugin. 
- Why is the one to many for conference to speaker a radio box, and not a select box?
The problem with a select box is that if there are too many elements (for example, a user table usually have a lot of entries) you have to get all those entries to render the select. We choose to have the one-to-many relationships as a pop-up with a list. You can choose in the radio button the elements you want to relate with.
You can configure a widget to specify the "select" behaviour using this widget: http://kaleidos.github.io/grails-admin-interface/guide/widgets.html#relationSelectWidget

- Why is the date filter collapsed, even when it's a mandatory field showing errors? It took me a while to find out why the conference wouldn't be saved, but there was a 'hidden' date range giving errors.
Sorry about that. We just wanted to show the capability to collapse fields.

-The 'New' buttons don't work? Adding a new speaker, a new talk, etc?
You're right, but I think the problem is with the sample application and not with the plugin itself. I will look into it when I can.

- Pagination is broken? (it always shows 0, but clicking on it does nothing. For screens with 10+ items, the only way to go the next screen is by pressing the next icon, not the page number. 
The pagination works but for the sample there are not enough data to show more pages.

I hope that you give it a try with your application and let us know on our github http://github.com/kaleidos/grails-admin-interface

Best regards,

Erik Pragt

unread,
Jul 19, 2014, 2:12:55 PM7/19/14
to grails-de...@googlegroups.com


On Saturday, July 19, 2014 5:06:58 PM UTC+2, Alonso Javier Torres Ortiz wrote:
Hello,

I'm one of the developers of the Grails Admin plugin. 
- Why is the one to many for conference to speaker a radio box, and not a select box?
The problem with a select box is that if there are too many elements (for example, a user table usually have a lot of entries) you have to get all those entries to render the select. We choose to have the one-to-many relationships as a pop-up with a list. You can choose in the radio button the elements you want to relate with.
You can configure a widget to specify the "select" behaviour using this widget: http://kaleidos.github.io/grails-admin-interface/guide/widgets.html#relationSelectWidget

Excuse me, I was unclear here! I meant a checkbox instead of a radiobutton, not a dropdown box. A checkbox which allows for selecting multiple speakers, and those things. So you don't have to get the whole list, and you also don't have to open and close the popup each time when selecting multiple items.

- Why is the date filter collapsed, even when it's a mandatory field showing errors? It took me a while to find out why the conference wouldn't be saved, but there was a 'hidden' date range giving errors.
Sorry about that. We just wanted to show the capability to collapse fields.

Haha, no worries :-). Collapse fields are nice! Maybe it would be nice to mark them as erroneous, or expand them when they have errors, else they are impossible to find. Just an idea, I don't know how complex it is to implement this.
 

-The 'New' buttons don't work? Adding a new speaker, a new talk, etc?
You're right, but I think the problem is with the sample application and not with the plugin itself. I will look into it when I can.

Sure, no problm
 

- Pagination is broken? (it always shows 0, but clicking on it does nothing. For screens with 10+ items, the only way to go the next screen is by pressing the next icon, not the page number. 
The pagination works but for the sample there are not enough data to show more pages.

I know, so I added some more items to make it paginatable, but it doesn't work correctly. When you have 10 or less, you see only the 0, which is a bit weird. For example, when going to Speakers. When you have more than 10, you see 0, 1 and next. When you click on 0, nothing happens. When you click on 1, nothing happens. When you click on next, you go to the next screen, and there, at the bottom of the screen, you see 'back, 0, 1'. When you press back, you go back. When you press 0, you go back. And when you press the 1, you also go back. I think that's not correct :-)

After this feedback, I do want to say that the plugin looks great, and I'll for sure use it! Thanks for creating it!!
Reply all
Reply to author
Forward
0 new messages