Grails-Plugin-Consortium / grails-filterpane

Filterpane plugin for grails.
Apache License 2.0
16 stars 44 forks source link

InList / NotInList filter support for Enum values #19

Closed wavyx closed 11 years ago

wavyx commented 11 years ago

I've added the support for InList / NotInList criteria limited to field with Enum type. The FilterPane button render a multiple g.select in order to support multiple Enum selections. I hope this change fits the current behaviour. Edit: added i18n messages

Eric

ctoestreich commented 11 years ago

Looks good. Can you add a few tests for this behavior? There should be some existing ones you can copy.

wavyx commented 11 years ago

Will try to add some tomorrow

wavyx commented 11 years ago

I've tried to add TagLib and Service tests. About the service test part, I'm not sure how to mimic the params for multiple values. Form submission encode as String[]. So I converted the array list with toArray() method. On the other hand if someone populates filter with already parsed values (ie ArrayList of BookType) this will not work properly since the newVal would be null and no criterion would be added. Does this make sense to you? Do you think we have to support manual value injections ?