Package org.rhq.coregui.client.alert.definitions.ResourceOperationNotificationInfo

Examples of org.rhq.coregui.client.alert.definitions.ResourceOperationNotificationInfo.ResourceSelectionMode


        modes.put(ResourceSelectionMode.RELATIVE.name(), ResourceSelectionMode.RELATIVE.getDisplayString());
        modeSelectItem.setValueMap(modes);
        modeSelectItem.addChangedHandler(new ChangedHandler() {
            @Override
            public void onChanged(ChangedEvent event) {
                ResourceSelectionMode mode = ResourceSelectionMode.valueOf(event.getValue().toString());
                switch (mode) {
                case SELF: {
                    setOperationDropDownMenuValues(resourceType.getId(), null, null);
                    break;
                }
                case SPECIFIC: {
                    singleResourceTextItem.setValue(MSG
                        .view_alert_definition_notification_operation_editor_specific_pick_text());
                    singleResourceTextItem.setAttribute(RESOURCE_ID_ATTRIBUTE, 0);
                    hideOperationDropDownMenu();
                    break;
                }
                case RELATIVE: {
                    ancestorTypeSelectItem.clearValue();
                    descendantTypeSelectItem.clearValue();
                    descendantNameTextItem.clearValue();
                    hideOperationDropDownMenu();
                    populateRelativeDropDownMenus(null, null, null, null);
                    break;
                }
                }
            }
        });

        dynamicForm.setFields(modeSelectItem, singleResourceTextItem, singleResourceButtonItem, ancestorTypeSelectItem,
            descendantTypeSelectItem, descendantNameTextItem, operationSelectItem);

        addMember(dynamicForm);
        addMember(operationArgumentsCanvasItem);

        // prepopulate the form
        ResourceOperationNotificationInfo notifInfo;
        notifInfo = ResourceOperationNotificationInfo.load(getConfiguration(), getExtraConfiguration());
        ResourceSelectionMode mode = notifInfo.getMode();
        if (mode != null) {
            modeSelectItem.setValue(mode.name());
            switch (mode) {
            case SELF: {
                setOperationDropDownMenuValues(resourceType.getId(), notifInfo.getOperationId(),
                    notifInfo.getOperationArguments());
                break;
View Full Code Here


                    setExtraConfiguration(null);
                }

                // now fill in the configuration object with the information based on what was selected
                String selectedModeString = modeSelectItem.getValue().toString();
                ResourceSelectionMode selectedMode = ResourceSelectionMode.valueOf(selectedModeString);
                cleanConfiguration(); // erase anything previously in here
                Configuration config = getConfiguration();
                config.put(new PropertySimple(ResourceOperationNotificationInfo.Constants.SELECTION_MODE
                    .getPropertyName(), selectedMode));
                switch (selectedMode) {
View Full Code Here

TOP

Related Classes of org.rhq.coregui.client.alert.definitions.ResourceOperationNotificationInfo.ResourceSelectionMode

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.