Ignore:
Timestamp:
Jan 21, 2010, 4:07:26 PM (14 years ago)
Author:
gav
Message:

Add CustomTagLib with checkBoxList.

File:
1 edited

Legend:

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

    r268 r286  
    2323        "${this.name}"
    2424    }
     25
     26    //  This additional setter is used to convert the checkBoxList string
     27    //  of ids selected to the corresponding domain objects.
     28    public void setAssetSubItemsFromCheckBoxList(ids) {
     29        def idList = []
     30        ids.each() {
     31            if(it.isInteger())
     32                idList << it.toInteger()
     33        }
     34        this.assetSubItems = idList.collect { AssetSubItem.get( it ) }
     35    }
     36
    2537}
    2638
Note: See TracChangeset for help on using the changeset viewer.