public static TimelineUpdater getCurrentInstance ( String id ) { FacesContext fc = FacesContext . getCurrentInstance ( ) ; @ SuppressWarnings ( "unchecked" ) Map < String , TimelineUpdater > map = ( Map < String , TimelineUpdater > ) fc . getAttributes ( ) . get ( TimelineUpdater . class . getName ( ) ) ; if ( map == null ) { return null ; } UIComponent timeline = fc . getViewRoot ( ) . findComponent ( id ) ; if ( timeline == null || ! ( timeline instanceof Timeline ) ) { throw new FacesException ( "Timeline component with Id " + id + " was not found" ) ; } TimelineUpdater timelineUpdater = map . get ( ( ( Timeline ) timeline ) . resolveWidgetVar ( ) ) ; if ( timelineUpdater != null ) { timelineUpdater . id = id ; } return timelineUpdater ; }
Gets the current thread - safe TimelineUpdater instance by Id .