Package org.rhq.coregui.client.components.selector

Examples of org.rhq.coregui.client.components.selector.AssignedItemsChangedHandler


        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);
View Full Code Here


            if (!this.isSystemRole) {
                Record[] groupRecords = record.getAttributeAsRecordArray(RolesDataSource.Field.RESOURCE_GROUPS);
                ListGridRecord[] groupListGridRecords = toListGridRecordArray(groupRecords);
                this.resourceGroupSelector = new RoleResourceGroupSelector(groupListGridRecords,
                    !this.hasManageSecurityPermission);
                this.resourceGroupSelector.addAssignedItemsChangedHandler(new AssignedItemsChangedHandler() {
                    public void onSelectionChanged(AssignedItemsChangedEvent event) {
                        onItemChanged();
                    }
                });
                updateTab(this.resourceGroupsTab, this.resourceGroupSelector);

                Record[] bundleGroupRecords = record.getAttributeAsRecordArray(RolesDataSource.Field.BUNDLE_GROUPS);
                ListGridRecord[] bundleGroupListGridRecords = toListGridRecordArray(bundleGroupRecords);
                this.bundleGroupSelector = new RoleBundleGroupSelector(bundleGroupListGridRecords,
                    !this.hasManageSecurityPermission);
                this.bundleGroupSelector.addAssignedItemsChangedHandler(new AssignedItemsChangedHandler() {
                    public void onSelectionChanged(AssignedItemsChangedEvent event) {
                        onItemChanged();
                    }
                });
                updateTab(this.bundleGroupsTab, this.bundleGroupSelector);

            }

            ListGridRecord[] subjectListGridRecords = toListGridRecordArray(subjectRecords);
            if (getRecordId() == RolesDataSource.ID_SUPERUSER) {
                // If this is the superuser role, make sure the rhqadmin record is disabled, so it cannot be removed
                // from the role, and filter the overlord record out, so users don't even know it exists.
                List<ListGridRecord> filteredSubjectRecords = new ArrayList<ListGridRecord>();
                for (ListGridRecord subjectListGridRecord : subjectListGridRecords) {
                    int subjectId = subjectListGridRecord.getAttributeAsInt(UsersDataSource.Field.ID);
                    if (subjectId == UsersDataSource.ID_RHQADMIN) {
                        subjectListGridRecord.setEnabled(false);
                    }
                    if (subjectId != UsersDataSource.ID_OVERLORD) {
                        filteredSubjectRecords.add(subjectListGridRecord);
                    }
                }
                subjectListGridRecords = filteredSubjectRecords.toArray(new ListGridRecord[filteredSubjectRecords
                    .size()]);
            }
            this.subjectSelector = new RoleSubjectSelector(subjectListGridRecords, !this.hasManageSecurityPermission);
            this.subjectSelector.addAssignedItemsChangedHandler(new AssignedItemsChangedHandler() {
                public void onSelectionChanged(AssignedItemsChangedEvent event) {
                    onItemChanged();
                }
            });
            updateTab(this.subjectsTab, this.subjectSelector);

            if (this.isLdapConfigured) {
                Record[] ldapGroupRecords = record.getAttributeAsRecordArray(RolesDataSource.Field.LDAP_GROUPS);
                ListGridRecord[] ldapGroupListGridRecords = toListGridRecordArray(ldapGroupRecords);
                this.ldapGroupSelector = new RoleLdapGroupSelector(ldapGroupListGridRecords,
                    !this.hasManageSecurityPermission);
                this.ldapGroupSelector.addAssignedItemsChangedHandler(new AssignedItemsChangedHandler() {
                    public void onSelectionChanged(AssignedItemsChangedEvent event) {
                        onItemChanged();
                    }
                });
                updateTab(this.ldapGroupsTab, this.ldapGroupSelector);
View Full Code Here

        metric.setTitleOrientation(TitleOrientation.TOP);
        metric.setValueField("id");
        metric.setDisplayField("displayName");
        metric.setOptionDataSource(new ResourceScheduledMetricDatasource());

        resourceGroupSelector.addAssignedItemsChangedHandler(new AssignedItemsChangedHandler() {

            public void onSelectionChanged(AssignedItemsChangedEvent event) {

                if (resourceGroupSelector.getSelection().size() == 1) {
                    metric.fetchData();
View Full Code Here

            Record[] roleRecords = record.getAttributeAsRecordArray(UsersDataSource.Field.ROLES);
            ListGridRecord[] roleListGridRecords = toListGridRecordArray(roleRecords);
            boolean rolesAreReadOnly = areRolesReadOnly(record);

            this.roleSelector = new SubjectRoleSelector(roleListGridRecords, rolesAreReadOnly);
            this.roleSelector.addAssignedItemsChangedHandler(new AssignedItemsChangedHandler() {
                public void onSelectionChanged(AssignedItemsChangedEvent event) {
                    UserEditView.this.onItemChanged();
                }
            });
            getContentPane().addMember(this.roleSelector);
View Full Code Here

TOP

Related Classes of org.rhq.coregui.client.components.selector.AssignedItemsChangedHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.