Ignore:
Timestamp:
Jan 26, 2011, 5:35:35 AM (13 years ago)
Author:
gav
Message:

Domain change, frist draft of creating taskProcedure dynamic form.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/features/taskProcedureRework/grails-app/domain/TaskProcedure.groovy

    r758 r760  
     1import org.apache.commons.collections.list.LazyList;
     2import org.apache.commons.collections.FactoryUtils;
     3
    14class TaskProcedure {
    25
    36    Task parentTask
    4 
     7    List maintenanceActions = new ArrayList()
    58    static hasMany = [tasks: Task, maintenanceActions: MaintenanceAction]
    69
    710    static mappedBy = [tasks:"taskProcedure"]
     11
     12    static mapping = {
     13        maintenanceActions cascade:"all,delete-orphan"
     14    }
    815
    916//     static belongsTo = []
     
    1522        "${this.id}"
    1623    }
     24
     25    def getExpandableMaintenanceActionList() {
     26        return LazyList.decorate(maintenanceActions, FactoryUtils.instantiateFactory(MaintenanceAction.class))
     27    }
    1728}
Note: See TracChangeset for help on using the changeset viewer.