private void authorizedRenderView(final int bundleGroupId, final ViewPath viewPath) {
    permissionCheckBundleGroupId = bundleGroupId;

    super.renderView(viewPath);

    init(!(canManage || canAssign || canUnassign));
  }
  @Override
  protected void reset() {
    super.reset();

    if (this.bundleSelector != null) {
      this.bundleSelector.reset();
    }
  }
  @Override
  protected void save(DSRequest requestProperties) {
    // Grab the currently assigned bundles from the selector and stick them into the corresponding
    // canvas
    // item on the form, so when the form is saved, they'll get submitted along with the rest of the
    // simple fields
    // to the datasource's add or update methods.
    if (bundleSelector != null) {
      ListGridRecord[] bundleRecords = this.bundleSelector.getSelectedRecords();
      getForm().setValue(BundleGroupsDataSource.FIELD_BUNDLES, bundleRecords);
    }

    // Submit the form values to the datasource.
    super.save(requestProperties);
  }
  @Override
  protected void editRecord(Record record) {
    super.editRecord(record);

    Record[] bundleRecords = record.getAttributeAsRecordArray(BundleGroupsDataSource.FIELD_BUNDLES);
    ListGridRecord[] bundleListGridRecords = toListGridRecordArray(bundleRecords);

    this.bundleSelector = new BundleSelector(bundleListGridRecords, canAssign, canUnassign);
    this.bundleSelector.addAssignedItemsChangedHandler(
        new AssignedItemsChangedHandler() {
          public void onSelectionChanged(AssignedItemsChangedEvent event) {
            BundleGroupEditView.this.onItemChanged();
          }
        });
    updateTab(this.bundlesTab, this.bundleSelector);
  }