Examples of UpdateHistoryEvent


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

     * Performs the search.
     */
    private void doSearch()
    {
        EventBus.getInstance().notifyObservers(
                new UpdateHistoryEvent(new CreateUrlRequest(Page.SEARCH, generateParams(searchBox.getText()), false)));
    }
View Full Code Here

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

                new Observer<InsertedPluginDefinitionResponseEvent>()
                {
                    public void update(final InsertedPluginDefinitionResponseEvent arg1)
                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(Page.SETTINGS, "tab", "Plugins")));
                        pluginTab.reload();
                        Session.getInstance().getEventBus()
                                .notifyObservers(
                                        new ShowNotificationEvent(new Notification(
                                                "Stream Plugin has been successfully added")));
View Full Code Here

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

                            Session.getInstance().getEventBus().notifyObservers(new ShowNotificationEvent(
                                    new Notification(event.getParameters().get(NOTIFICATION_PARAM))));
                           
                            // hides the notification param in the address bar
                            Session.getInstance().getEventBus().notifyObservers(
                                    new UpdateHistoryEvent(new CreateUrlRequest(NOTIFICATION_PARAM, null, false)));
                        }
                    }
                });
    }
View Full Code Here

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

     * Update the history.
     */
    public void updateHistory()
    {
        Session.getInstance().getEventBus().notifyObservers(
                new UpdateHistoryEvent(new CreateUrlRequest(renderer.getFilterHistoryToken(), String.valueOf(group
                        .getId()), true)));
    }
View Full Code Here

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

                DomainGroupModelView group = ev.getResponse();

                // destination depends on whether org allows immediate creation of groups
                CreateUrlRequest urlRqst = !group.isPending() ? new CreateUrlRequest(Page.GROUPS, group.getShortName())
                        : new CreateUrlRequest(Page.DISCOVER, "");
                eventBus.notifyObservers(new UpdateHistoryEvent(urlRqst));

                // tell the user what just happened
                eventBus.notifyObservers(new ShowNotificationEvent(new Notification(group.isPending() ? // \n
                "Your group has been submitted to an organization coordinator for approval"
                        : "Your group has been successfully created")));
View Full Code Here

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

                {
                    Map<String, String> parameters = new HashMap<String, String>();
                    parameters.put(UINotifier.NOTIFICATION_PARAM, text);

                    Session.getInstance().getEventBus().notifyObservers(
                            new UpdateHistoryEvent(new CreateUrlRequest(Page.START, "", parameters)));
                }
                // otherwise, throw the notification event as normal
                else
                {
                    Session.getInstance().getEventBus().notifyObservers(
                            new UpdateHistoryEvent(new CreateUrlRequest(Page.START)));

                    Session.getInstance().getEventBus().notifyObservers(
                            new ShowNotificationEvent(new Notification(text)));
                }
            }
        });

        setupGalleryTabTemplateEvents();

        Session.getInstance().getEventBus().addObserver(UserLoggedInEvent.class, new Observer<UserLoggedInEvent>()
        {
            public void update(final UserLoggedInEvent event)
            {
                Session.getInstance().getEventBus().notifyObservers(GalleryPageLoadedEvent.getEvent());
            }
        });

        final HashMap<String, String> gadgetParams = new HashMap<String, String>();
        gadgetParams.put("tab", Session.getInstance().getParameterValue("tab"));
        gadgetParams.put("galleryTab", "Apps");

        final HashMap<String, String> themeParams = new HashMap<String, String>();
        themeParams.put("tab", Session.getInstance().getParameterValue("tab"));
        themeParams.put("galleryTab", "Themes");

        Session.getInstance().getEventBus().addObserver(InsertedGadgetDefinitionResponseEvent.class,
                new Observer<InsertedGadgetDefinitionResponseEvent>()
                {
                    public void update(final InsertedGadgetDefinitionResponseEvent arg1)
                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(Page.GALLERY, gadgetParams)));
                        gadgetTab.reload();
                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification("Your app has been successfully added")));
                    }
                });

        Session.getInstance().getEventBus().addObserver(UpdatedGadgetDefinitionResponseEvent.class,
                new Observer<UpdatedGadgetDefinitionResponseEvent>()
                {
                    public void update(final UpdatedGadgetDefinitionResponseEvent arg1)
                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(Page.GALLERY, gadgetParams)));
                        gadgetTab.reload();
                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification("Your app has been successfully saved")));
                    }
                });

        Session.getInstance().getEventBus().addObserver(InsertedThemeResponseEvent.class,
                new Observer<InsertedThemeResponseEvent>()
                {
                    public void update(final InsertedThemeResponseEvent arg1)
                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(Page.GALLERY, themeParams)));
                        themeTab.reload();
                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification("Your theme has been successfully added")));
                    }

                });
        Session.getInstance().getEventBus().addObserver(UpdatedThemeResponseEvent.class,
                new Observer<UpdatedThemeResponseEvent>()
                {
                    public void update(final UpdatedThemeResponseEvent arg1)
                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(Page.GALLERY, themeParams)));
                        themeTab.reload();
                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification("Your theme has been successfully saved")));
                    }
                });
View Full Code Here

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

                new Observer<InsertedGalleryTabTempalateResponseEvent>()
                {
                    public void update(final InsertedGalleryTabTempalateResponseEvent arg1)
                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(Page.GALLERY, tabParams)));
                        tabTemplateTab.reload();
                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification("Your tab has been successfully added")));
                    }
                });

        Session.getInstance().getEventBus().addObserver(UpdatedGalleryTabTemplateResponseEvent.class,
                new Observer<UpdatedGalleryTabTemplateResponseEvent>()
                {
                    public void update(final UpdatedGalleryTabTemplateResponseEvent arg1)
                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(Page.GALLERY, tabParams)));
                        tabTemplateTab.reload();
                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification("Your tab has been successfully saved")));
                    }
                });

        Session.getInstance().getEventBus().addObserver(AddTabFromGalleryTabTemplateResponseEvent.class,
                new Observer<AddTabFromGalleryTabTemplateResponseEvent>()
                {
                    public void update(final AddTabFromGalleryTabTemplateResponseEvent arg1)
                    {
                        String text = "Tab has been applied";

                        // since a refresh happens in IE7 when navigating to the start page, show the notification
                        // by passing in a notification url parameter
                        if (MasterComposite.getUserAgent().contains("msie 7"))
                        {
                            Map<String, String> parameters = new HashMap<String, String>();
                            parameters.put(UINotifier.NOTIFICATION_PARAM, text);

                            Session.getInstance().getEventBus().notifyObservers(
                                    new UpdateHistoryEvent(new CreateUrlRequest(Page.START, "", parameters)));
                        }
                        // otherwise, throw the notification event as normal
                        else
                        {
                            Session.getInstance().getEventBus().notifyObservers(
                                    new UpdateHistoryEvent(new CreateUrlRequest(Page.START)));

                            Session.getInstance().getEventBus().notifyObservers(
                                    new ShowNotificationEvent(new Notification(text)));
                        }
                    }
View Full Code Here

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

     * Updates the history.
     */
    public void updateHistory()
    {
        Session.getInstance().getEventBus().notifyObservers(
                new UpdateHistoryEvent(new CreateUrlRequest("streamId", String.valueOf(stream.getId()), true)));
    }
View Full Code Here

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

        EventBus.getInstance().addObserver(UpdatedGroupResponseEvent.class, new Observer<UpdatedGroupResponseEvent>()
        {
            public void update(final UpdatedGroupResponseEvent arg1)
            {
                Session.getInstance().getEventBus().notifyObservers(
                        new UpdateHistoryEvent(new CreateUrlRequest(Page.GROUPS, arg1.getResponse().getShortName())));

                Session.getInstance().getEventBus().notifyObservers(
                        new ShowNotificationEvent(new Notification("Your group has been successfully saved")));
            }
        });

        form.addFormElement(new ValueOnlyFormElement(DomainGroupModelView.ID_KEY, Long.toString(entity.getId())));
        form.addFormElement(new ValueOnlyFormElement(DomainGroupModelView.SHORT_NAME_KEY, entity.getShortName()));

        AvatarUploadFormElement avatarFormEl = new AvatarUploadFormElement("Avatar",
                "Select a JPG, PNG or GIF image from your computer. The maxium file size is 4MB",
                "/eurekastreams/groupavatarupload?groupName=" + entity.getShortName(), Session.getInstance()
                        .getActionProcessor(), new AvatarUploadStrategy<DomainGroupModelView>(entity,
                        "resizeGroupAvatar", EntityType.GROUP));
        form.addWidget(avatarFormEl);

        form.addFormDivider();

        form.addFormElement(new BasicTextBoxFormElement(MAX_NAME, false, "Group Name", DomainGroupModelView.NAME_KEY,
                entity.getName(), "", true));
        form.addFormDivider();

        form.addFormElement(new BasicTextAreaFormElement(DomainGroup.MAX_DESCRIPTION_LENGTH, "Description",
                DomainGroupModelView.DESCRIPTION_KEY, entity.getDescription(),
                "Enter a few sentences that describe the purpose of your group's stream.  "
                        + "This description will appear beneath your avatar "
                        + "and in the profile search results pages.", false));

        form.addFormDivider();

        AutoCompleteItemDropDownFormElement keywords = new AutoCompleteItemDropDownFormElement("Keywords",
                DomainGroupModelView.KEYWORDS_KEY, DomainFormatUtility.buildCapabilitiesStringFromStrings(entity
                        .getCapabilities()),
                "Add keywords that describe your group and the topics your members will be talking about. Separate "
                        + "keywords with a comma. Including keywords helps others find your group when searching "
                        + "profiles.", false, "/resources/autocomplete/capability/", "itemNames", ",");
        keywords.setMaxLength(MAX_KEYWORDS);

        form.addFormElement(keywords);
        form.addFormDivider();

        form.addFormElement(new BasicTextBoxFormElement("Website URL", "url", entity.getUrl(),
                "If your group has a website, you can enter the URL above", false));
        form.addFormDivider();

        String coordinstructions = "The group coordinators will be responsible for managing the organization profile, "
                + "and moderating the group's activity stream";

        form.addFormElement(new PersonModelViewLookupFormElement("Group Coordinators", "Add Coordinator",
                coordinstructions, DomainGroupModelView.COORDINATORS_KEY, entity.getCoordinators(), true));

        form.addFormDivider();

        final Label currentPrivacySettingLabel = new Label();
        currentPrivacySettingLabel.setText("Privacy Settings");
        currentPrivacySettingLabel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().formLabel());
        final FlowPanel currentPrivacySettingDescription = new FlowPanel();
        final Label currentPrivacySettingDescriptionTitle = new Label();
        currentPrivacySettingDescriptionTitle.setText(entity.isPublic() ? "Public" : "Private");
        currentPrivacySettingDescriptionTitle.addStyleName(StaticResourceBundle.INSTANCE.coreCss().formStaticValue());
        final Label currentPrivacySettingDescriptionInfo = new Label();
        if (entity.isPublic())
        {
            currentPrivacySettingDescriptionInfo.setText("Public groups are visible to all users and accessible "
                    + "through a profile search.");
        }
        else
        {
            currentPrivacySettingDescriptionInfo.setText("Access to private groups is restricted to employees"
                    + " approved by the group's coordinators.  Group coordinators can view a list of pending "
                    + "requests by going to the admin tab on the group's profile.");
        }
        currentPrivacySettingDescriptionInfo.addStyleName(StaticResourceBundle.INSTANCE.coreCss().formInstructions());
        currentPrivacySettingDescription.add(currentPrivacySettingDescriptionTitle);
        currentPrivacySettingDescription.add(currentPrivacySettingDescriptionInfo);
        currentPrivacySettingDescription.addStyleName(StaticResourceBundle.INSTANCE.coreCss().privacySettingsValue());
        final FlowPanel currentPrivacySettingPanel = new FlowPanel();
        currentPrivacySettingPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().formElement());
        currentPrivacySettingPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().privacySettings());
        currentPrivacySettingPanel.add(currentPrivacySettingLabel);
        currentPrivacySettingPanel.add(currentPrivacySettingDescription);
        form.addWidget(currentPrivacySettingPanel);

        if (!entity.isPublic())
        {
            final HTML privateNote = new HTML("<span class=\"form-static-value\">Please Note:</span> "
                    + "This group's name and description will be visible whenever employees browse or"
                    + " search profiles.");
            privateNote.addStyleName(StaticResourceBundle.INSTANCE.coreCss().privacySettingsNote());
            privateNote.addStyleName(StaticResourceBundle.INSTANCE.coreCss().formInstructions());
            currentPrivacySettingPanel.add(privateNote);
        }

        form.addFormDivider();

        // TODO: evidently this is supposed to go away
        BasicCheckBoxFormElement blockWallPost = new BasicCheckBoxFormElement("Stream Moderation",
                DomainGroupModelView.STREAM_POSTABLE_KEY, "Allow others to post to your group's stream", false, entity
                        .isStreamPostable());
        BasicCheckBoxFormElement blockCommentPost = new BasicCheckBoxFormElement(null,
                DomainGroupModelView.STREAM_COMMENTABLE_KEY,
                "Allow others to comment on activity in your group's stream", false, entity.isCommentable());

        blockWallPost.addStyleName(StaticResourceBundle.INSTANCE.coreCss().streamModeration());
        blockCommentPost.addStyleName(StaticResourceBundle.INSTANCE.coreCss().streamModeration());
        blockCommentPost.addStyleName(StaticResourceBundle.INSTANCE.coreCss().commentModeration());

        form.addFormElement(blockWallPost);
        form.addFormElement(blockCommentPost);
        form.addFormDivider();

        // ---- Action buttons ----

        deleteButton.addStyleName(StaticResourceBundle.INSTANCE.coreCss().formDeleteGroupButton());
        deleteButton.addStyleName(StaticResourceBundle.INSTANCE.coreCss().formButton());

        deleteButton.addClickHandler(new ClickHandler()
        {
            public void onClick(final ClickEvent event)
            {
                if (new WidgetJSNIFacadeImpl().confirm("Are sure that you want to delete this group? "
                        + "Deleting the group will remove the profile from the system along with "
                        + "all of the activity that has been posted to its stream."))
                {
                    form.turnOffChangeCheck();
                    processingSpinny.setVisible(true);
                    deleteButton.setVisible(false);

                    // TODO - might should put this in GroupModel (and mark it as Deletable) but there's no
                    // custom onFailure ability there yet.
                    Session.getInstance().getActionProcessor().makeRequest("deleteGroupAction", entity.getId(),
                            new AsyncCallback<Boolean>()
                            {
                                public void onSuccess(final Boolean result)
                                {
                                    // adds notification to top of page
                                    Session.getInstance().getEventBus().notifyObservers(
                                            new ShowNotificationEvent(new Notification("The group '"
                                                    + entity.getName() + "' has been deleted")));

                                    // navigates away from settings page to the parent org profile page
                                    Session.getInstance().getEventBus().notifyObservers(
                                            new UpdateHistoryEvent(new CreateUrlRequest(Page.PEOPLE, Session
                                                    .getInstance().getCurrentPerson().getAccountId())));
                                }

                                public void onFailure(final Throwable caught)
                                {
View Full Code Here

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

        eventBus.addObserver(StreamSearchBeginEvent.class, new Observer<StreamSearchBeginEvent>()
        {
            public void update(final StreamSearchBeginEvent event)
            {
                eventBus.notifyObservers(new UpdateHistoryEvent(new CreateUrlRequest("search", event.getSearchText(),
                        false)));
            }
        });

        eventBus.addObserver(DeletedActivityResponseEvent.class, new Observer<DeletedActivityResponseEvent>()
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.