Package org.rhq.coregui.client.util.message

Examples of org.rhq.coregui.client.util.message.Message


    }

    @Override
    public void propertyValueChanged(PropertyValueChangeEvent event) {
        MessageCenter messageCenter = CoreGUI.getMessageCenter();
        Message message;
        if (event.isInvalidPropertySetChanged()) {
            Map<String, String> invalidPropertyNames = event.getInvalidPropertyNames();
            if (invalidPropertyNames.isEmpty()) {
                this.saveButton.enable();
                message = new Message("All properties now have valid values, so the configuration can now be saved.",
                    Message.Severity.Info, EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
            } else {
                this.saveButton.disable();
                message = new Message("The following properties have invalid values: " + invalidPropertyNames.values()
                    + " - the values must be corrected before the configuration can be saved.", Message.Severity.Error,
                    EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
            }
            messageCenter.notify(message);
        } else if (event.getInvalidPropertyNames().isEmpty()) {
View Full Code Here


        return editor;
    }

    private void save() {
        CoreGUI.getMessageCenter().notify(
            new Message("Member configurations updated.", "Member configurations updated."));
        reloadConfiguration();
    }
View Full Code Here

        addMember(buttonbar);

        refresh();

        if (!this.hasWriteAccess) {
            Message message = new Message(MSG.view_configurationDetails_noPermission(), Message.Severity.Info,
                EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
            CoreGUI.getMessageCenter().notify(message);
        }
    }
View Full Code Here

            public void onFailure(Throwable caught) {
                CoreGUI.getErrorHandler().handleError(MSG.view_configurationDetails_error_updateFailure(), caught);
            }

            public void onSuccess(Void result) {
                Message message = new Message(MSG.view_drift_success_templateUpdated(), Message.Severity.Info);
                CoreGUI.getMessageCenter().notify(message);
            }
        });
    }
View Full Code Here

    }

    @Override
    public void propertyValueChanged(PropertyValueChangeEvent event) {
        MessageCenter messageCenter = CoreGUI.getMessageCenter();
        Message message;
        if (event.isInvalidPropertySetChanged()) {
            Map<String, String> invalidPropertyNames = event.getInvalidPropertyNames();
            if (invalidPropertyNames.isEmpty()) {
                this.saveButton.enable();
                message = new Message(MSG.view_configurationDetails_allPropertiesValid(), Message.Severity.Info,
                    EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
            } else {
                this.saveButton.disable();
                message = new Message(MSG.view_configurationDetails_somePropertiesInvalid(invalidPropertyNames.values()
                    .toString()), Message.Severity.Error, EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
            }
            messageCenter.notify(message);
        } else if (event.getInvalidPropertyNames().isEmpty()) {
            this.saveButton.enable();
View Full Code Here

    }

    @Override
    public void propertyValueChanged(PropertyValueChangeEvent event) {
        MessageCenter messageCenter = CoreGUI.getMessageCenter();
        Message message;
        if (event.isInvalidPropertySetChanged()) {
            Map<String, String> invalidPropertyNames = event.getInvalidPropertyNames();
            if (invalidPropertyNames.isEmpty()) {
                this.saveButton.enable();
                message = new Message("All properties now have valid values, so the configuration can now be saved.",
                    Message.Severity.Info, EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
            } else {
                this.saveButton.disable();
                message = new Message("The following properties have invalid values: " + invalidPropertyNames.values()
                    + " - the values must be corrected before the configuration can be saved.", Message.Severity.Error,
                    EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
            }
            messageCenter.notify(message);
        } else if (event.getInvalidPropertyNames().isEmpty()) {
View Full Code Here

        Map<String, Property> allProps = c.getAllProperties();
        for (Property prop : allProps.values()) {
            getPropertyStrings(prop, str, "");
        }
        str.append("=~/pre~=");
        CoreGUI.getMessageCenter().notify(new Message("Configuration updated.", str.toString()));
        reloadConfiguration();
    }
View Full Code Here

                            if (condition.getMeasurementDefinition() != null) {
                                Integer id = Integer.valueOf(condition.getMeasurementDefinition().getId());
                                if (metricIdsUsed.containsKey(id)) {
                                    String msg = MSG
                                        .view_alert_definition_condition_editor_metricswarning(metricIdsUsed.get(id));
                                    Message warning = new Message(msg, Severity.Warning, EnumSet
                                        .of(Message.Option.Transient));
                                    CoreGUI.getMessageCenter().notify(warning);
                                    event.cancel(); // multiple conditions used the same metric with ALL conjunction, this doesn't work - abort (BZ 737565)
                                    break;
                                }
View Full Code Here

                new AsyncCallback<BundleDeployment>() {
                    public void onSuccess(BundleDeployment result) {
                        deployingImage.setSrc(ImageManager.getStatusComplete());
                        deployingMessage.setText(MSG.view_bundle_revertWizard_revertStep_scheduled());
                        CoreGUI.getMessageCenter().notify(
                            new Message(MSG.view_bundle_revertWizard_revertStep_scheduledDetails(result.getName(),
                                result.getDestination().getGroup().getName()), Severity.Info));
                        CoreGUI.refresh();
                        wizard.setDeployment(result);
                    }
View Full Code Here

                    resourceErrorIds[i++] = record.getAttributeAsInt(Field.ID);
                }

                GWTServiceLookup.getResourceService().deleteResourceErrors(resourceErrorIds, new AsyncCallback<Void>() {
                    public void onSuccess(Void result) {
                        Message msg = new Message(MSG.dataSource_resourceErrors_deleteSuccess(String
                            .valueOf(selection.length)), Severity.Info);
                        CoreGUI.getMessageCenter().notify(msg);
                        refresh();
                    }
View Full Code Here

TOP

Related Classes of org.rhq.coregui.client.util.message.Message

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.