protected void updateEditPane(OperationPermissionTarget item,Set selected){
  if (item != null) {
    if (selected.size() == 1) {
      String name=item.getMetaClassName();
      String localName=item.getLocalName();
      selectedTargetCaption.setVisible(true);
      selectedTargetCaption.setValue(name);
      selectedTargetCaption.setDescription(name);
      selectedTargetLocalCaption.setVisible(true);
      selectedTargetLocalCaption.setValue(localName);
      selectedTargetLocalCaption.setDescription(localName);
      for (      EntityOperationControl control : operationControls) {
        if (control.applicableToEntity(item.getEntityClass())) {
          control.show();
        }
 else {
          control.hide();
        }
      }
    }
 else     if (selected.size() > 1) {
      selectedTargetCaption.setVisible(false);
      selectedTargetCaption.setValue("");
      selectedTargetLocalCaption.setVisible(false);
      selectedTargetLocalCaption.setValue("");
      for (      EntityOperationControl control : operationControls)       control.show();
      for (      Object obj : selected) {
        OperationPermissionTarget target=(OperationPermissionTarget)obj;
        for (        EntityOperationControl control : operationControls) {
          if (control.isControlVisible() && !control.applicableToEntity(target.getEntityClass()))           control.hide();
        }
      }
    }
  }
}

protected void updateEditPane ( OperationPermissionTarget item , Set selected ) { if ( item != null ) { if ( selected . size ( ) == 1 ) { String name = item . getMetaClassName ( ) ; String localName = item . getLocalName ( ) ; selectedTargetCaption . setVisible ( true ) ; selectedTargetCaption . setValue ( name ) ; selectedTargetCaption . setDescription ( name ) ; selectedTargetLocalCaption . setVisible ( true ) ; selectedTargetLocalCaption . setValue ( localName ) ; selectedTargetLocalCaption . setDescription ( localName ) ; for ( EntityOperationControl control : operationControls ) { if ( control . applicableToEntity ( item . getEntityClass ( ) ) ) { control . show ( ) ; } else { control . hide ( ) ; } } } else if ( selected . size ( ) > 1 ) { selectedTargetCaption . setVisible ( false ) ; selectedTargetCaption . setValue ( "" ) ; selectedTargetLocalCaption . setVisible ( false ) ; selectedTargetLocalCaption . setValue ( "" ) ; for ( EntityOperationControl control : operationControls ) control . show ( ) ; for ( Object obj : selected ) { OperationPermissionTarget target = ( OperationPermissionTarget ) obj ; for ( EntityOperationControl control : operationControls ) { if ( control . isControlVisible ( ) && ! control . applicableToEntity ( target . getEntityClass ( ) ) ) control . hide ( ) ; } } } } }
update edit controls visibility
