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

Domain change, frist draft of creating taskProcedure dynamic form.

Location:
branches/features/taskProcedureRework/grails-app/domain
Files:
2 edited

Legend:

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

    r756 r760  
    1010    String reasoning = ""
    1111    Integer procedureStepNumber
     12
     13    boolean deleted
     14    static transients = [ 'deleted' ]
    1215
    1316//     static hasMany = []
  • 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.