public final void restoreDataContext ( final String fullName ) { String [ ] parts = fullName . split ( ":" ) ; if ( ! isNeedRestore ( fullName , parts ) ) { return ; } boolean stopSkip = false ; List < String > list = parent . getCurrent ( ) . getCurrentDataContextNameList ( ) ; int listSize = list . size ( ) ; // prepare collection data in context. // must loop through the full name which may have multiple // layer. // i.e. E.department.1:E.employee.0 // need prepare department.1 and employee.0 for ( int i = 0 ; i < parts . length ; i ++ ) { String part = parts [ i ] ; boolean skip = false ; if ( ( ! stopSkip ) && ( i < listSize ) ) { String listPart = list . get ( i ) ; if ( part . equalsIgnoreCase ( listPart ) ) { skip = true ; } } if ( ! skip ) { stopSkip = true ; startRestoreDataContext ( part ) ; } } if ( stopSkip ) { parent . getCurrent ( ) . setCurrentDataContextName ( fullName ) ; } return ; }
Restore data context .