Package org.eurekastreams.web.client.ui.common.pagedlist

Examples of org.eurekastreams.web.client.ui.common.pagedlist.PagedListPanel


        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(),
View Full Code Here


                    {
                        onHistoryParameterChange(event.getParameters());
                    }
                });

        searchResultsPanel = new PagedListPanel("searchResults", new TwoColumnPagedListRenderer());
        searchResultsPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().searchResults());
        FlowPanel contentPanel = new FlowPanel();
        contentPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().searchResultsContent());

        Label header = new Label("Profile Search Results");
View Full Code Here

        super(inIdentifier);

        super.setParamsToClear(PagedListPanel.URL_PARAM_LIST_ID, PagedListPanel.URL_PARAM_FILTER,
                PagedListPanel.URL_PARAM_SORT, Pager.URL_PARAM_START_INDEX, Pager.URL_PARAM_END_INDEX);

        PagedListPanel panel = buildPanel();
        setContents(panel);
    }
View Full Code Here

        final EventBus eventBus = Session.getInstance().getEventBus();
        final String flaggedActivitiesFilterName = "Flagged Activities";
        final String pendingGroupsFilterName = "Group Requests";

        // set up the tab itself
        final PagedListPanel adminTabContent = new PagedListPanel("pending", new SingleColumnPagedListRenderer(),
                "tab", "Pending");
        adminTabContent.addStyleName(StaticResourceBundle.INSTANCE.coreCss().pendingTabContent());

        // wire up the data retrieval events
        eventBus.addObserver(GotFlaggedActivitiesResponseEvent.class, new Observer<GotFlaggedActivitiesResponseEvent>()
        {
            public void update(final GotFlaggedActivitiesResponseEvent event)
            {
                if (flaggedActivitiesFilterName.equals(adminTabContent.getCurrentFilter()))
                {
                    adminTabContent.render(event.getResponse(), "No flagged activities.");
                }
                flaggedActivityCount = event.getResponse().getTotal();
                adminTabContent.setFilterTitle(flaggedActivitiesFilterName, "Flagged Activities ("
                        + flaggedActivityCount + ")");
                setTitle("Pending (" + (flaggedActivityCount + pendingGroupCount) + ")");
            }
        });

        eventBus.addObserver(GotPendingGroupsResponseEvent.class, new Observer<GotPendingGroupsResponseEvent>()
        {
            public void update(final GotPendingGroupsResponseEvent event)
            {
                if (pendingGroupsFilterName.equals(adminTabContent.getCurrentFilter()))
                {
                    adminTabContent.render(event.getResponse(), "No pending group requests.");
                }
                pendingGroupCount = event.getResponse().getTotal();
                adminTabContent.setFilterTitle(pendingGroupsFilterName, "Group Requests (" + pendingGroupCount + ")");
                setTitle("Pending (" + (flaggedActivityCount + pendingGroupCount) + ")");
            }
        });

        // request the data to get the counts
        // We need the counts for both of the lists, but at most one list will perform an initial data load, we need to
        // force the load. (Only the list which is visible will load; if the tab is inactive then there are zero
        // visible lists.)
        FlaggedActivityModel.getInstance().fetch(new GetFlaggedActivitiesRequest(0, 1), false);
        PendingGroupsModel.getInstance().fetch(new GetPendingGroupsRequest(0, 1), false);

        // 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();
            }
        });

        eventBus.addObserver(UpdatedReviewPendingGroupResponseEvent.class,
                new Observer<UpdatedReviewPendingGroupResponseEvent>()
                {
                    public void update(final UpdatedReviewPendingGroupResponseEvent ev)
                    {
                        adminTabContent.reload();
                    }
                });

        eventBus.addObserver(DeletedActivityResponseEvent.class, new Observer<DeletedActivityResponseEvent>()
        {
            public void update(final DeletedActivityResponseEvent ev)
            {
                adminTabContent.reload();
            }
        });

        // prepare the StaticResourceBundle.INSTANCE.coreCss().filters()
        // flagged content StaticResourceBundle.INSTANCE.coreCss().filter()
        StreamMessageItemRenderer flaggedRenderer = new StreamMessageItemRenderer(ShowRecipient.YES);
        flaggedRenderer.setShowManageFlagged(true);
        flaggedRenderer.setShowComment(true);

        BaseActivityLinkBuilder activityLinkBuilder = new InContextActivityLinkBuilder();
        activityLinkBuilder.addExtraParameter("manageFlagged", "true");
        flaggedRenderer.setActivityLinkBuilder(activityLinkBuilder);
        adminTabContent.addSet(flaggedActivitiesFilterName, FlaggedActivityModel.getInstance(), flaggedRenderer,
                new GetFlaggedActivitiesRequest(0, 0));
        // pending groups StaticResourceBundle.INSTANCE.coreCss().filter()
        adminTabContent.addSet(pendingGroupsFilterName, PendingGroupsModel.getInstance(), new PendingGroupRenderer(),
                new GetPendingGroupsRequest(0, 0));

        return adminTabContent;
    }
View Full Code Here

            galleryPortalContainer.add(addGadget);
            galleryPortalContainer.add(addTheme);
            galleryPortalContainer.add(addTab);
        }

        gadgetTab = new PagedListPanel("gadgets", new SingleColumnPagedListRenderer());
        themeTab = new PagedListPanel("themes", new SingleColumnPagedListRenderer());
        tabTemplateTab = new PagedListPanel("tabs", new SingleColumnPagedListRenderer());

        portalPage = new TabContainerPanel("galleryTab");

        // setup the params to set when the tab is activated
        Map<String, String> gadgetTabParams = new HashMap<String, String>();
View Full Code Here

TOP

Related Classes of org.eurekastreams.web.client.ui.common.pagedlist.PagedListPanel

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.