Package org.eurekastreams.web.client.history

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


                        HashMap<String, String> params = new HashMap<String, String>();
                        params.put(URL_PARAM_START_INDEX, startIndex.toString());
                        params.put(URL_PARAM_END_INDEX, endIndex.toString());

                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(params, false)));
                    }
                }
            });

            this.add(prev);
            prev.addStyleName(StaticResourceBundle.INSTANCE.coreCss().pagerBackward());
            prev.addClickHandler(new ClickHandler()
            {
                public void onClick(final ClickEvent event)
                {
                    if (startIndex - pageSize >= 0)
                    {
                        startIndex -= pageSize;
                        endIndex -= pageSize;
                        Session.getInstance().getEventBus().notifyObservers(new PagerUpdatedEvent(thisBuffered));

                        HashMap<String, String> params = new HashMap<String, String>();
                        params.put(URL_PARAM_START_INDEX, startIndex.toString());
                        params.put(URL_PARAM_END_INDEX, endIndex.toString());

                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(params, false)));
                    }
                }
            });
        }
View Full Code Here


        initWidget(main);

        // set text and link for name; assume group if not person
        Page linkPage = (inStreamDTO.getEntityType() == EntityType.PERSON) ? Page.PEOPLE : Page.GROUPS;
        String nameUrl = Session.getInstance().generateUrl(//
                new CreateUrlRequest(linkPage, inStreamDTO.getUniqueId()));
        streamNameLink.setTargetHistoryToken(nameUrl);
        streamNameLink.setText(inStreamDTO.getDisplayName());
        streamNameLink.setTitle(inStreamDTO.getDisplayName());

        // set info text
View Full Code Here

                                clearRetainedValues();
                            }

                        });

        form.setOnCancelHistoryToken(Session.getInstance().generateUrl(new CreateUrlRequest(Page.START)));
        form.turnOffChangeCheck();
        hideableSiteLabel = new HideableTextAreaFormElement(MAX_SITELABEL, "Site Labeling", "siteLabel",
                systemSettingValues.getSiteLabel(), "I would like to add a label to the system.",
                "The site label will be displayed above the global navigation bar and below the "
                        + "footer on all pages in the system. If disabled, no label area will "
View Full Code Here

        initWidget(binder.createAndBindUi(this));

        UIObject.setVisible(suggestionsEmptyLabel, false);
        UIObject.setVisible(mostViewedEmptyLabel, false);
        createGroupButton.setTargetHistoryToken(Session.getInstance()
                .generateUrl(new CreateUrlRequest(Page.NEW_GROUP)));

        EventBus.getInstance().addObserver(GotStreamDiscoverListsDTOResponseEvent.class,
                new Observer<GotStreamDiscoverListsDTOResponseEvent>()
                {
                    public void update(final GotStreamDiscoverListsDTOResponseEvent event)
View Full Code Here

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

        }

        // assume group if not person
        Page linkPage = (inStreamDTO.getEntityType() == EntityType.PERSON) ? Page.PEOPLE : Page.GROUPS;
        String nameUrl = Session.getInstance().generateUrl(//
                new CreateUrlRequest(linkPage, inStreamDTO.getUniqueId()));
        streamNameLink.setTargetHistoryToken(nameUrl);
        streamNameLink.setText(inStreamDTO.getDisplayName());

        streamDescriptionText.setInnerText(inStreamDTO.getDescription());
    }
View Full Code Here

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

        HashMap<String, String> params = new HashMap<String, String>();
        params.put("tab", "Plugins");
        params.put("action", "newPlugin");
        addPlugin = new Hyperlink("Add Plugin", Session.getInstance().generateUrl(new CreateUrlRequest(params)));

        panel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().gallery());
        panel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().galleryMaster());
        panel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().pluginsMaster());
        galleryAddOrEditContainer.addStyleName(StaticResourceBundle.INSTANCE.coreCss().settingsTab());
        this.add(panel);
        addPlugin.addStyleName(StaticResourceBundle.INSTANCE.coreCss().addGadget());

        panel.add(galleryPortalContainer);
        panel.add(galleryAddOrEditContainer);

        galleryPortalContainer.add(addPlugin);

        // Calling this gadgets so it works with a GadgetMetaDataRenderer. Do NOT change to plugins.
        pluginTab = new PagedListPanel("gadgets", new SingleColumnPagedListRenderer());
        galleryPortalContainer.add(pluginTab);

        pluginTab.addSet("All", PluginDefinitionModel.getInstance(), new PluginMetaDataRenderer(),
                new GetGalleryItemsRequest("recent", "", 0, 0));
        pluginTab.addSet("Internet Services", PluginDefinitionModel.getInstance(), new PluginMetaDataRenderer(),
                new GetGalleryItemsRequest("recent", "Internet Services", 0, 0));

        Session.getInstance().getEventBus().addObserver(GotGadgetMetaDataEvent.class,
                new Observer<GotGadgetMetaDataEvent>()
                {
                    public void update(final GotGadgetMetaDataEvent event)
                    {
                        pluginTab.render(new PagedSet<GadgetMetaDataDTO>(pluginsFrom, pluginsTo, pluginsTotal, event
                                .getMetadata()), "There are no plugins in this category.");
                    }
                });

        Session.getInstance().getEventBus().addObserver(GotPluginDefinitionModelResponseEvent.class,
                new Observer<GotPluginDefinitionModelResponseEvent>()
                {
                    public void update(final GotPluginDefinitionModelResponseEvent event)
                    {
                        pluginsFrom = event.getResponse().getFromIndex();
                        pluginsTo = event.getResponse().getToIndex();
                        pluginsTotal = event.getResponse().getTotal();

                        if (pluginsTotal == 0)
                        {
                            Session.getInstance().getEventBus().notifyObservers(
                                    new GotGadgetMetaDataEvent(new LinkedList<GadgetMetaDataDTO>()));
                        }
                        else
                        {
                            GadgetMetaDataFetcher fetcher = // \n
                            new GadgetMetaDataFetcher(event.getResponse().getPagedSet());
                            fetcher.fetchMetaData();
                        }
                    }
                });

        Session.getInstance().getEventBus().addObserver(InsertedPluginDefinitionResponseEvent.class,
                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")));
                    }
                });

        Session.getInstance().getEventBus().addObserver(DeletedPluginDefinitionResponseEvent.class,
                new Observer<DeletedPluginDefinitionResponseEvent>()
                {
                    public void update(final DeletedPluginDefinitionResponseEvent arg1)
                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification(
                                        "Stream Plugin has been successfully deleted")));
                    }
                });

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

                    public void update(final UpdatedHistoryParametersEvent event)
                    {
                        if (event.getParameters().get("action").equals("newPlugin"))
                        {
                            galleryPortalContainer.setVisible(false);
                            galleryAddOrEditContainer.setVisible(true);
                            galleryAddOrEditContainer.clear();

                            String defaultCategory = null;
                            String defaultUrl = "";
                            String id = "";

                            FormBuilder form = new FormBuilder("Submit a Plugin", PluginDefinitionModel.getInstance(),
                                    Method.INSERT);

                            form.turnOffChangeCheck();
                            form.setOnCancelHistoryToken(Session.getInstance().generateUrl(
                                    new CreateUrlRequest(Page.SETTINGS, "tab", "Plugins")));
                            form.addFormElement(new ValueOnlyFormElement("id", id));
                            HTML infoMessage = new HTML(
                                    "<span class='gallery-upload-note'><strong>Please Note:</strong><br />"
                                            + "Please be sure your XML file includes the required fields.<br />"
                                            + " You will not be able to upload the XML without the required"
View Full Code Here

        imageContainer.addStyleName(StaticResourceBundle.INSTANCE.coreCss().imageContainer());
        imageContainer.add(baseImage);

        content.add(imageContainer);

        saveButton = new Hyperlink("save", Session.getInstance().generateUrl(new CreateUrlRequest()));
        saveButton.addStyleName(StaticResourceBundle.INSTANCE.coreCss().formSaveButton());
        saveButton.addStyleName(StaticResourceBundle.INSTANCE.coreCss().formButton());
        content.add(saveButton);

        closeButton = new Hyperlink("cancel", StaticResourceBundle.INSTANCE.coreCss().settings());
View Full Code Here

                            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

        groupMetaData.add(new InlineLabel(new DateFormatter().timeAgo(group.getDateAdded(), true)));
        insertActionSeparator(groupMetaData);
        groupMetaData.add(new InlineLabel("By: "));
        String url =
                Session.getInstance().generateUrl(
                        new CreateUrlRequest(Page.PEOPLE, group.getPersonCreatedByAccountId()));
        groupMetaData.add(new InlineHyperlink(group.getPersonCreatedByDisplayName(), url));
       
        // Display Business Area (BA) information
        insertActionSeparator(groupMetaData);
        groupMetaData.add(new InlineLabel("BA: "));
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.