tags:

views:

77

answers:

1

Hi, I am developing a GWT application with presenter, dispatcher and Gin. I have a presenter which is retrieving an ArrayList<JobPosting> from server and firing a ManageJobsEvent.

dispatcher.execute(new GetJobPostings(userId), new 
DisplayCallback<GetJobPostingsResult>(display) { 
                        @Override 
                        protected void handleFailure(Throwable e) { 
                                e.printStackTrace(); 
                                Window.alert(SERVER_ERROR); 
                        } 
                        @Override 
                        protected void handleSuccess(GetJobPostingsResult value) { 
                                eventBus.fireEvent(new ManageJobsEvent(value.getUserId(), 
value.getJobPostings())); 
                        } 
                }); 

I get the callback to onPlaceRequest(PlaceRequest request) of my another presenter but how do i get the ArrayList<JobPostings> set in the event.

A: 

I'm not sure I understand your problem correctly, but since you are passing the ArrayList<JobPostings> to the constructor of the ManageJobsEvent, why not just add a getter to retrieve it?

Igor Klimer