Package org.eurekastreams.web.client.events

Examples of org.eurekastreams.web.client.events.ShowNotificationEvent


                            // show a notification
                            Session.getInstance()
                                    .getEventBus()
                                    .notifyObservers(
                                            new ShowNotificationEvent(new Notification(
                                                    "Your request for access has been sent")));
                        }
                    }
                    else
                    {
View Full Code Here


        // wire up events to refresh the list when something is removed
        eventBus.addObserver(UpdatedActivityFlagResponseEvent.class, new Observer<UpdatedActivityFlagResponseEvent>()
        {
            public void update(final UpdatedActivityFlagResponseEvent ev)
            {
                eventBus.notifyObservers(new ShowNotificationEvent(new Notification(
                        "The flagged activity has been allowed")));
                adminTabContent.reload();
            }
        });
View Full Code Here

                    if (new WidgetJSNIFacadeImpl().confirm("Are you sure you want to delete this tab? "))
                    {
                        GalleryTabTemplateModel.getInstance().delete(inItem.getId());

                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification("The " + inItem.getTitle()
                                        + " tab has been deleted.")));
                    }
                }
            });
        }
View Full Code Here

                        if (event.getResponse() == gadgetData.getId())
                        {
                            thisBuffered.setVisible(false);
                            thisBuffered.addStyleName(StaticResourceBundle.INSTANCE.coreCss().hidden());
                            Session.getInstance().getEventBus().notifyObservers(
                                    new ShowNotificationEvent(new Notification(new UndoDeleteNotification("App",
                                            new ClickHandler()
                                            {
                                                public void onClick(final ClickEvent event)
                                                {
                                                    GadgetModel.getInstance().undoDelete(gadgetData.getId());
View Full Code Here

                        ThemeModel.getInstance().delete(theme.getId());

                        Session.getInstance()
                                .getEventBus()
                                .notifyObservers(
                                        new ShowNotificationEvent(new Notification("The " + theme.getName()
                                                + " theme has been deleted.")));
                    }
                }
            });
        }
View Full Code Here

                                    public void update(final DeletedStartPageTabResponseEvent event)
                                    {
                                        tabs.removeTab(String.valueOf(event.getResponse().getId()));
                                        tabs.addTab(newTab);
                                        Session.getInstance().getEventBus().notifyObservers(
                                                new ShowNotificationEvent(new Notification(new UndoDeleteNotification(
                                                        event.getResponse().getTabName(), new ClickHandler()
                                                        {
                                                            public void onClick(final ClickEvent clickEvent)
                                                            {
                                                                StartTabsModel.getInstance().undoDelete(
View Full Code Here

                    {
                        model.delete(metaData.getGadgetDefinition().getId());

                        Session.getInstance().getEventBus()
                                .notifyObservers(
                                        new ShowNotificationEvent(new Notification(metaData.getTitle()
                                                + " has been deleted.")));
                        thisBuffered.setVisible(false);
                    }
                }
            });

        }

        FlowPanel imageContainer = new FlowPanel();
        imageContainer.addStyleName(StaticResourceBundle.INSTANCE.coreCss().imageContainer());

        addStyleName(StaticResourceBundle.INSTANCE.coreCss().gadgetMetaData());

        // Im a gadget.
        if (tabId != null)
        {
            if (metaData.getThumbnail() != null && !metaData.getThumbnail().equals(""))
            {
                imageContainer.add(new Image(metaData.getThumbnail()));
            }
            else
            {
                imageContainer.add(new Image("/style/images/gadget-gallery-default.png"));
            }

            applyGadget = new Hyperlink("Apply App", History.getToken());
            applyGadget.addStyleName(StaticResourceBundle.INSTANCE.coreCss().applyGadget());
            applyGadget.addClickHandler(new ClickHandler()
            {
                public void onClick(final ClickEvent event)
                {
                    GadgetModel.getInstance()
                            .insert(
                                    new AddGadgetToStartPageRequest("{" + metaData.getGadgetDefinition().getUUID()
                                            + "}", tabId));
                }
            });

            Session.getInstance().getEventBus().addObserver(GadgetAddedToStartPageEvent.class,
                    new Observer<GadgetAddedToStartPageEvent>()
                    {

                        public void update(final GadgetAddedToStartPageEvent arg1)
                        {
                            Session.getInstance().getEventBus().notifyObservers(
                                    new ShowNotificationEvent(new Notification("App has been added")));

                            if (arg1.getGadget().getGadgetDefinition().getId() == metaData.getGadgetDefinition()
                                    .getId())
                            {
                                setActive(true);
View Full Code Here

                else if (caught instanceof ExecutionException || caught instanceof GeneralException)
                {
                    Session.getInstance()
                            .getEventBus()
                            .notifyObservers(
                                    new ShowNotificationEvent(new Notification(
                                            "Error occurred, please refresh and try again.")));
                    Session.getInstance().getEventBus()
                            .notifyObservers(new ExceptionResponseEvent(caught, thisBuffered, request));
                }
            }
View Full Code Here

                                    SystemSettingsModel.getInstance().clearCache();

                                    Session.getInstance()
                                            .getEventBus()
                                            .notifyObservers(
                                                    new ShowNotificationEvent(new Notification("Access List Saved")));
                                    History.newItem(History.getToken());

                                    MembershipCriteriaDTO result = event.getMembershipCriteria();
                                    result.setId(persistedItemId);
                                    Session.getInstance().getEventBus()
                                            .notifyObservers(new MembershipCriteriaPersistedEvent(result));
                                }
                            });
                }
            }
        });

        eventBus.addObserver(MembershipCriteriaRemovedEvent.class, new Observer<MembershipCriteriaRemovedEvent>()
        {
            public void update(final MembershipCriteriaRemovedEvent event)
            {
                processor.makeRequest("removeMembershipCriteria", event.getMembershipCriteria().getId(),
                        new AsyncCallback<SystemSettings>()
                        {
                            public void onFailure(final Throwable caught)
                            {
                            }

                            public void onSuccess(final SystemSettings systemSettings)
                            {
                                // TODO: Refactor to use new client models
                                SystemSettingsModel.getInstance().clearCache();

                                Session.getInstance().getEventBus()
                                        .notifyObservers(new ShowNotificationEvent(new Notification("Item Deleted")));
                                History.newItem(History.getToken());
                            }
                        });
            }
        });
View Full Code Here

                            public void update(final UpdatedSystemSettingsResponseEvent arg1)
                            {
                                form.onSuccess();
                                Session.getInstance()
                                        .getEventBus()
                                        .notifyObservers(new ShowNotificationEvent(new Notification("Settings saved")));

                                clearRetainedValues();
                            }

                        });
View Full Code Here

TOP

Related Classes of org.eurekastreams.web.client.events.ShowNotificationEvent

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.