Package org.eurekastreams.web.client.events

Examples of org.eurekastreams.web.client.events.EventBus.addObserver()


    public void show()
    {
        final EventBus eventBus = Session.getInstance().getEventBus();
        if (groups == null)
        {
            eventBus.addObserver(GotPersonJoinedGroupsResponseEvent.class,
                    new Observer<GotPersonJoinedGroupsResponseEvent>()
                    {
                        public void update(final GotPersonJoinedGroupsResponseEvent event)
                        {
                            eventBus.removeObserver(event, this);
View Full Code Here


                    new GetFollowersFollowingRequest(EntityType.GROUP, Session.getInstance().getCurrentPerson()
                            .getAccountId(), 0, Integer.MAX_VALUE), true);
        }
        if (subscribedGroupIds == null)
        {
            eventBus.addObserver(GotGroupActivitySubscriptionsResponseEvent.class,
                    new Observer<GotGroupActivitySubscriptionsResponseEvent>()
                    {
                        public void update(final GotGroupActivitySubscriptionsResponseEvent event)
                        {
                            eventBus.removeObserver(event, this);
View Full Code Here

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

                        + flaggedActivityCount + ")");
                setTitle("Pending (" + (flaggedActivityCount + pendingGroupCount) + ")");
            }
        });

        eventBus.addObserver(GotPendingGroupsResponseEvent.class, new Observer<GotPendingGroupsResponseEvent>()
        {
            public void update(final GotPendingGroupsResponseEvent event)
            {
                if (pendingGroupsFilterName.equals(adminTabContent.getCurrentFilter()))
                {
View Full Code Here

        // 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")));
View Full Code Here

                        "The flagged activity has been allowed")));
                adminTabContent.reload();
            }
        });

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

                    {
                        adminTabContent.reload();
                    }
                });

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

    public void wireEventHandlers()
    {
        if (!eventsWired)
        {
            final EventBus eventBus = Session.getInstance().getEventBus();
            eventBus.addObserver(ValidationExceptionResponseEvent.class, validationExceptionResponseHandler);
            eventBus.addObserver(ExceptionResponseEvent.class, exceptionResponseHandler);
            eventBus.addObserver(PreSwitchedHistoryViewEvent.class, preSwitchedHistoryViewHandler);
            eventBus.addObserver(SubmitFormIfChangedEvent.class, submitFormIfChangedHandler);
            eventsWired = true;
        }
View Full Code Here

    {
        if (!eventsWired)
        {
            final EventBus eventBus = Session.getInstance().getEventBus();
            eventBus.addObserver(ValidationExceptionResponseEvent.class, validationExceptionResponseHandler);
            eventBus.addObserver(ExceptionResponseEvent.class, exceptionResponseHandler);
            eventBus.addObserver(PreSwitchedHistoryViewEvent.class, preSwitchedHistoryViewHandler);
            eventBus.addObserver(SubmitFormIfChangedEvent.class, submitFormIfChangedHandler);
            eventsWired = true;
        }
    }
View Full Code Here

        if (!eventsWired)
        {
            final EventBus eventBus = Session.getInstance().getEventBus();
            eventBus.addObserver(ValidationExceptionResponseEvent.class, validationExceptionResponseHandler);
            eventBus.addObserver(ExceptionResponseEvent.class, exceptionResponseHandler);
            eventBus.addObserver(PreSwitchedHistoryViewEvent.class, preSwitchedHistoryViewHandler);
            eventBus.addObserver(SubmitFormIfChangedEvent.class, submitFormIfChangedHandler);
            eventsWired = true;
        }
    }
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.