public void updateClassElements ( final UIClassification _uiclass ) throws EFapsException { // remove previous added classification forms final Iterator < Element > iter2 = this . elements . iterator ( ) ; final Map < UUID , String > uuid2InstanceKey = new HashMap <> ( ) ; while ( iter2 . hasNext ( ) ) { final IFormElement element = iter2 . next ( ) . getElement ( ) ; if ( element instanceof UIFieldForm ) { final String instanceKey = ( ( UIFieldForm ) element ) . getInstanceKey ( ) ; final TargetMode mode = ( ( UIFieldForm ) element ) . getMode ( ) ; if ( instanceKey != null && ! TargetMode . CREATE . equals ( mode ) ) { final UUID classUUID = ( ( UIFieldForm ) element ) . getClassificationUUID ( ) ; uuid2InstanceKey . put ( classUUID , instanceKey ) ; } iter2 . remove ( ) ; } } addClassElements ( _uiclass , uuid2InstanceKey ) ; }
Method that removes all classifcations and afterwards adds the classification forms as elements to the form by walking down the tree .