--- In flexcoders@yahoogroups.com, "tspyro2002" <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm currently developing a Villa Reservation system for a client using > Flex and at the moment I'm a prototype side bar which holds the search > function. > > What I'm stuck on is how to reference the disabled dates and check > them against the date range that the user has chosen. At the moment I > have it set up that the user can choose from 4 date ranges - 3, 5, 7 > and 14 nights. There are also 3 countries with different disabled > dates (not date ranges as yet). > > My prototype is here at http://www.ravendigital.co.uk/Sample/Sample.html > > If anyone has any ideas (or code) that can point me in the right > direction, that would be a great help.
I have a similar thing going on where I have Task VOs that have to be used in different ways in different parts of the application. One part of my application is an array of SchedulerDates (dates that can have a Task attached). I created a Singleton TaskManager, which is essentially my "master" list of Tasks. When any part of the application needs to display associated Tasks, it checks the TaskManager and pulls a reference to the Tasks it needs. For instance, when a SchedulerDate is created, it calls the getTaskForDate method on the TaskManager, which makes a temporary copy of its tasks ArrayCollection and does a filter on it to return any applicable Task that might be scheduled for that date. I suspect I'm not quite there yet on the best way to apply this pattern, but it's working for me. HTH; Amy