Thanks Jurgen,

That's where I was headed originally, but I found that the ScheduleModel
wasn't doing what I needed it to...  the loadEntries method takes a range of
dates and draws all entries that fall within that range.  It could calculate
whether a recurring entry should happen during this range, but the startTime
and endTime in the Entry should still be the original startTime & endTime,
so when it goes to actually draw it, it won't be drawn for each day that it
occurs... only the original dates.  This is why I think the calculation of
occurance should happen in the Renderer...

Thoughts?

Mike


Jurgen Lust-2 wrote:
> 
> I would put the recurrence logic in the implementation of ScheduleModel,
> where the data are retrieved from a database or other source. The
> ScheduleModel then functions as an adapter between your rich domain
> model and the simple ScheduleEntries. The ScheduleEntries contain just
> the amount of information needed to draw an entry on the schedule. You
> could add a boolean property that specifies whether it's a recurring
> entry, and then customize the ScheduleEntryRenderer so that it uses a
> different color or an icon or something.
> 
> Jurgen
> 
> Op woensdag 04-04-2007 om 12:42 uur [tijdzone -0700], schreef Michael
> Brindamour:
>> Has anyone tried to override the schedule component to handle
>> ScheduleEntries that recur based on a pattern set in the entry?  I've
>> got my ScheduleEntry class set up to do so, but am realizing that the
>> renderer just calls getStartTime & getEndTime to figure out where to
>> paint them...  I haven't overridden a renderer yet... Has anyone already
>> done this or have any thoughts?
>> 
>> Mike
>> 
>> 
>> -- 
>> Michael Brindamour
>> NetSight Engineering, Enterasys Networks, Inc.
>> Office: (978) 684-1332
>> Fax: (call above before faxing) (978) 684-1691
>> Cell: (603) 682-0014
>> Email: [EMAIL PROTECTED]
> -- 
> ____________________________________________________
> Jurgen Lust
> email: [EMAIL PROTECTED]
> blog: http://jroller.com/page/jurgenlust
> ____________________________________________________
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Schedule-Component---Recurring-Entries-tf3527895.html#a9853723
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to