fields icon indicating copy to clipboard operation
fields copied to clipboard

allow templates for collections/associations containing certain types

Open zyro23 opened this issue 13 years ago • 2 comments

if you want to adjust all fields for a certain hasMany association or a collection property, there is no direct way with the existing template lookup. e.g. domain A and B both got a hasMany = [cs: C], then you would need to customize _fields/a/cs/_input.gsp and _fields/b/cs/_input.gsp.

sticking with the existing templates-for-types convention option, i could imagine something like _fields/collection/myAssociatedDomainClass/_input.gsp _fields/set/myAssociatedDomainClass/_input.gsp _fields/collection/enum/_input.gsp and so on.

the enum example shows that it would be nice if this does not only apply to domain-associations but also to properties that are GrailsDomainClassProperty.basicCollectionType.

rob, if you do not got the necessary spare time but any thoughts on this, comment please. maybe i can find some time in the next weeks to tackle this.

zyro

zyro23 avatar Jun 27 '12 07:06 zyro23

Whilst I agree this is a good idea I think the suggested template paths clash with the existing one for _fields/<type>/<name>/_input.gsp.

I'm not sure if that's likely to matter in the real world, though.

robfletcher avatar Jul 07 '12 22:07 robfletcher

The components issue (#59) seems like it might cover this case rather well.

cdeszaq avatar Jul 26 '12 18:07 cdeszaq