public void removeChild ( HierarchicalFormModel child ) { Assert . notNull ( child , "child" ) ; child . removeParent ( ) ; children . remove ( child ) ; child . removePropertyChangeListener ( DIRTY_PROPERTY , childStateChangeHandler ) ; child . removePropertyChangeListener ( COMMITTABLE_PROPERTY , childStateChangeHandler ) ; // when dynamically adding/removing childModels take care of // dirtymessages: // removing child that was dirty: remove from dirty map and update dirty // state if ( dirtyValueAndFormModels . remove ( child ) ) dirtyUpdated ( ) ; }
Remove a child FormModel . Dirty and committable listeners are removed . When child was dirty remove the formModel from the dirty list and update the dirty state .