Ignore:
Timestamp:
Feb 10, 2010, 2:49:13 AM (14 years ago)
Author:
gav
Message:

Improvements to CustomTagLib checkBoxList, sorting, dynamic displayFields and a small fix to the domain class set method.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/Asset.groovy

    r329 r343  
    2626    }
    2727
    28     //  This additional setter is used to convert the checkBoxList string
     28    //  This additional setter is used to convert the checkBoxList string or string array
    2929    //  of ids selected to the corresponding domain objects.
    3030    public void setAssetSubItemsFromCheckBoxList(ids) {
    3131        def idList = []
    32         ids.each() {
    33             if(it.isInteger())
    34                 idList << it.toInteger()
     32        if(ids instanceof String) {
     33                if(ids.isInteger())
     34                    idList << ids.toInteger()
     35        }
     36        else {
     37            ids.each() {
     38                if(it.isInteger())
     39                    idList << it.toInteger()
     40            }
    3541        }
    3642        this.assetSubItems = idList.collect { AssetSubItem.get( it ) }
Note: See TracChangeset for help on using the changeset viewer.