Jim, it is not the UI/Controller place to deal with lists - that's the Model function. The controller requests information from the Model - e.g. item-at-location. The Mediator or source Adapters handling the Model piece of the architecture, need to handle the "list" and return to the controller only the information it is requesting. Julie Julie (Dingee) Carwellos Web and IT Project Analyst, User Experience and Interaction Designer LinkedIn - http://www.linkedin.com/in/jdingeecarwellos --- On Fri, 10/15/10, Jim Cant <cant_jim@xxxxxxxxxxx> wrote: From: Jim Cant <cant_jim@xxxxxxxxxxx> Subject: [tssg-tech] Re: UI expectations from Mediator or source adaptors To: "tssg tech" <tssg-tech@xxxxxxxxxxxxx> Date: Friday, October 15, 2010, 5:30 PM In the architecture we are using, the Mediators return a list of events, specifically, List<BELEvent>. You can get the information you want from the List interface; here is the Javadoc for it http://download-llnw.oracle.com/javase/6/docs/api/java/util/List.html. To get the information you describe, you'd do something like this: ... BELEventSource myEventSource = new BELEventSourceMediator(); List<BELEvent> eventList = myEventSource.getCurrentEventList(); int numberOfEvents = eventList.size(); BELEvent secondEvent = eventList.get( 1 ); // list on zero-based long secondEventId = secondEvent.getId(); long thirdEventId = eventList.get( 2 ).getId(); Currently, there is no Id field in the BELEvent object (or method to get it) but, curiously, while walking the dogs this morning, I was thinking we will probably need one. Reason being that we will likely need a way to point to specific events stored in the datastore. I'll put an Id in the event object though I'm not sure what form it will take. What are you anticipating using the Id for? Regarding lists of different types, your choices are two. You can get a List<BELEvent> from the event source which will be the latest events fetched from the source (the RSS feed) and you can get a similar list from the datastore which will be all the events that the user has saved. It will be up the application to manage these lists. It would be possible to get different lists from the datastore, say all events with a start date later than some specified date; this will require a expansion of the datastore interface (which is fine). jim Date: Fri, 15 Oct 2010 08:12:13 -0700 From: jcarwellos@xxxxxxxxx Subject: [tssg-tech] UI expectations from Mediator or source adaptors To: tssg-tech@xxxxxxxxxxxxx This is the information UI would need from the Mediator (if it's doing what I think it is) or the source adapters. The GUI would not want a list, just individual list items as the display manager requests them, and some general information about the list. It would be up to the data source components to manipulate their own lists and return the following to the UI. // Number of Event items in the list public int getCount() // the Event object at a certain position in the list public Object getItem(int position) // the ID of the item at a certain position; right now we just use the // position; not sure if you're planning on using the id in the guid or something else public long getItemId(int position) Since the user is in charge of switching between 'current' and 'saved' event lists (and possibly regional lists in future?), I'd also expect some way to tell the Mediator which one has been selected, as well as 'DEFAULT_CURRENT' or some other static value for 'give me the default startup list'. Mediator should be in charge of that. Thanks, Julie Julie (Dingee) Carwellos Web and IT Project Analyst, User Experience and Interaction Designer LinkedIn - http://www.linkedin.com/in/jdingeecarwellos