Package org.eurekastreams.web.client.history

Examples of org.eurekastreams.web.client.history.CreateUrlRequest


        activeSort.addStyleName(StaticResourceBundle.INSTANCE.coreCss().active());

        if (setHistory)
        {
            Session.getInstance().getEventBus().notifyObservers(
                    new UpdateHistoryEvent(new CreateUrlRequest("sort", String.valueOf(sort), false)));
        }
    }
View Full Code Here


                                Document.get().createClickEvent(1, 0, 0, 0, 0, false, false, false, false));
                    }
                    // search term in box - go to search page (should this be here?)
                    else if (!searchTerm.getText().isEmpty())
                    {
                        eventBus.notifyObservers(new UpdateHistoryEvent(new CreateUrlRequest(Page.SEARCH,
                                generateParams(searchTerm.getText()), false)));
                    }
                }
                else if (ev.isDownArrow() && activeItem != null)
                {
View Full Code Here

                params.put("listId", null);
                params.put("listFilter", null);
                params.put("listSort", null);
                params.put("startIndex", null);
                params.put("endIndex", null);
                String url = Session.getInstance().generateUrl(new CreateUrlRequest(params));

                String search = Session.getInstance().getParameterValue("search");
                String stream = Session.getInstance().getParameterValue("streamId");

                addGadgetLinkWrapper.setVisible(search == null);
View Full Code Here

        HashMap<String, String> params = new HashMap<String, String>();
        params.put("action", "addGadget");
        params.put("url", "{d7a58391-5375-4c76-b5fc-a431c42a7555}");
        params.put("prefs", "{\"streamQuery\":" + makeJsonString(streamQuery) + ",\"gadgetTitle\":"
                + makeJsonString(gadgetTitle) + ",\"streamLocation\":" + makeJsonString(location) + "}");
        String url = Session.getInstance().generateUrl(new CreateUrlRequest(Page.START, params));

        addGadgetLink.setTargetHistoryToken(url);
    }
View Full Code Here

        userPanel.add(userAvatar);

        FlowPanel userLinkPanel = new FlowPanel();

        String nameUrl = Session.getInstance().generateUrl(
                new CreateUrlRequest(Page.PEOPLE, currentPerson.getAccountId()));
        Hyperlink name = new Hyperlink(currentPerson.getDisplayName(), nameUrl);
        name.setTitle(currentPerson.getDisplayName());
        name.addStyleName(style.currentUserStreamLink());
        name.addStyleName(StaticResourceBundle.INSTANCE.coreCss().ellipsisChild());
        userLinkPanel.add(name);

        String confUrl = Session.getInstance().generateUrl(
                new CreateUrlRequest(Page.PERSONAL_SETTINGS, currentPerson.getAccountId()));
        Hyperlink conf = new Hyperlink("Configure My Stream", confUrl);
        conf.addStyleName(style.currentUserConfLink());
        userLinkPanel.add(conf);

        userPanel.add(userLinkPanel);
View Full Code Here

        Map<String, String> params = (search == null || search.isEmpty()) ? Collections.EMPTY_MAP : Collections
                .singletonMap("search", search);

        views.set(views.size() - 1, "recent");
        recentSort.setTargetHistoryToken(Session.getInstance().generateUrl(
                new CreateUrlRequest(Page.ACTIVITY, views, params)));

        views.set(views.size() - 1, "popular");
        popularSort.setTargetHistoryToken(Session.getInstance().generateUrl(
                new CreateUrlRequest(Page.ACTIVITY, views, params)));

        views.set(views.size() - 1, "active");
        activeSort.setTargetHistoryToken(Session.getInstance().generateUrl(
                new CreateUrlRequest(Page.ACTIVITY, views, params)));
    }
View Full Code Here

        {
            public void update(final StreamSearchBeginEvent event)
            {
                if (null == event.getSearchText())
                {
                    eventBus.notifyObservers(new UpdateHistoryEvent(new CreateUrlRequest("search", "", false)));
                    searchBox.setText("");
                }
            }
        });
    }
View Full Code Here

                    searchUrlTimer.cancel();

                    // don't load stream here - the URL change will cause it to be reloaded

                    EventBus.getInstance().notifyObservers(
                            new UpdateHistoryEvent(new CreateUrlRequest("search", searchText, false)));
                }
                else if ((searchTextLength > 2 && searchTextLength != lastSearchLength)
                        || searchTextLength < lastSearchLength)
                {
                    lastSearchLength = searchTextLength;

                    searchTimer.schedule(SEARCH_UPDATE_DELAY);
                }
            }
        });

        searchBox.addBlurHandler(new BlurHandler()
        {
            public void onBlur(final BlurEvent inEvent)
            {
                updateUrlWithSearchTerm();
            }
        });

        addBookmark.addClickHandler(new ClickHandler()
        {
            public void onClick(final ClickEvent event)
            {
                StreamBookmarksModel.getInstance().insert(currentScopeId);
                addBookmark.setVisible(false);
                EventBus.getInstance().notifyObservers(
                        new ShowNotificationEvent(new Notification("You have bookmarked this stream.")));
            }
        });

        subscribeViaEmail.addClickHandler(new ClickHandler()
        {
            public void onClick(final ClickEvent event)
            {
                if (!isSubscribed)
                {
                    if (currentStream.getScopeType().equals(ScopeType.GROUP))
                    {
                        Dialog.showCentered(new GroupEmailSubscribeOptionsDialogContent(currentStream.getUniqueKey()));
                    }
                    else if (currentStream.getScopeType().equals(ScopeType.PERSON))
                    {
                        PersonActivitySubscriptionModel.getInstance().insert(currentStream.getUniqueKey());
                        setSubscribeStatus(true);
                    }
                }
                else
                {
                    Deletable<String> deletable = null;

                    if (currentStream.getScopeType().equals(ScopeType.GROUP))
                    {
                        deletable = GroupActivitySubscriptionModel.getInstance();
                    }
                    else if (currentStream.getScopeType().equals(ScopeType.PERSON))
                    {
                        deletable = PersonActivitySubscriptionModel.getInstance();
                    }

                    if (deletable != null)
                    {
                        deletable.delete(currentStream.getUniqueKey());
                        setSubscribeStatus(false);
                    }
                }
            }
        });

        addToStartPage.addClickHandler(new ClickHandler()
        {
            public void onClick(final ClickEvent event)
            {
                // For the app's location, use the current URL minus a few parameters we know we don't want. (They are
                // used by other lists, but get left in the URL when switching tabs.)
                // We don't build the URL from the stream id, since that doesn't take search terms into account.
                HashMap<String, String> params = new HashMap<String, String>();
                params.put("listId", null);
                params.put("listFilter", null);
                params.put("listSort", null);
                params.put("startIndex", null);
                params.put("endIndex", null);
                String url = Session.getInstance().generateUrl(new CreateUrlRequest(params));

                // make a version of the query that doesn't have the exclusion list
                JSONObject request = currentRequestObj;
                if (request.containsKey("exclude"))
                {
View Full Code Here

        String searchText = searchBox.getText();
        String searchParam = Session.getInstance().getParameterValue("search");
        if (!searchText.equals(searchParam))
        {
            EventBus.getInstance().notifyObservers(
                    new UpdateHistoryEvent(new CreateUrlRequest("search", searchText, false)));
        }
    }
View Full Code Here

        panel.addStyleName(style.streamOptionChild());
        panel.addClickHandler(new ClickHandler()
        {
            public void onClick(final ClickEvent event)
            {
                History.newItem(Session.getInstance().generateUrl(new CreateUrlRequest(Page.ACTIVITY, view)));
            }
        });

        FlowPanel innerPanel = new FlowPanel();
View Full Code Here

TOP

Related Classes of org.eurekastreams.web.client.history.CreateUrlRequest

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.