fields icon indicating copy to clipboard operation
fields copied to clipboard

Support dot syntax for indexing map properties

Open robfletcher opened this issue 13 years ago • 3 comments

robfletcher avatar Feb 03 '12 18:02 robfletcher

+1 in a form asking data for several beans of same type (for example: "Person"), there will be several properties of same names (for example: "surname") returned by the "params" value, and the controller will not be able to know wich property belong to wich object.

The basic tag allows to use dot notation for names (for example: . Back in the controller, the bean can be instanciated with "mother = new Person(params.mother).

There should be the same possibility in the field plugin.

fred06 avatar May 07 '13 09:05 fred06

@fred06 all the tags accept a prefix attribute that allows you to do exactly that

On Tuesday, May 7, 2013, fred06 wrote:

+1 in a form asking data for several beans of same type (for example: "Person"), there will be several properties of same names (for example: "surname") returned by the "params" value, and the controller will not be able to know wich property belong to wich object.

The basic tag allows to use dot notation for names (for example: . Back in the controller, the bean can be instanciated with "mother = new Person(params.mother).

There should be the same possibility in the field plugin.

— Reply to this email directly or view it on GitHubhttps://github.com/robfletcher/grails-fields/issues/32#issuecomment-17532257 .

robfletcher avatar May 07 '13 12:05 robfletcher

@fred06 all the tags accept a prefix attribute that allows you to do exactly that.

On Tuesday, May 7, 2013, fred06 wrote:

+1 in a form asking data for several beans of same type (for example: "Person"), there will be several properties of same names (for example: "surname") returned by the "params" value, and the controller will not be able to know wich property belong to wich object.

The basic tag allows to use dot notation for names (for example: . Back in the controller, the bean can be instanciated with "mother = new Person(params.mother).

There should be the same possibility in the field plugin.

— Reply to this email directly or view it on GitHubhttps://github.com/robfletcher/grails-fields/issues/32#issuecomment-17532257 .

robfletcher avatar May 07 '13 14:05 robfletcher