Hi Pascal,

I wrote 

https://github.com/nullterminated/ponder/tree/master/ERR2d2w/Sources/er/r2d2w/foundation

to handle something like this once. 

The date ranges are like NSRange but they use longs instead of ints.  Those are 
used by the date range grouper ( a subclass of ERXDateGrouper which is a 
subclass of WODisplayGroup) to group events into days based on whether a date 
range overlaps that day.

The calendar components would then display the grouped date ranges how you 
like. I only ever wrote a month view component and it was really basic, but the 
idea was the same. 
You could probably extend it to do what you need if it still works. 

It's all done in NSTimestamp though which makes the date math impenetrable. If 
I did it again today, I'd use joda instead. Anyway, look at the R2DMonthView 
component if you are interested in example usage.

Ramsey

On Dec 13, 2012, at 12:09 PM, Pascal Robert wrote:

> Hi guys,
> 
> I'm working on a meeting room reservation system and I need to display a grid 
> with availability (just like a free/busy lookup in iCal). So the header row 
> is a list of days, with a sub row for each hour of the day. Each subsequent 
> row is a room, and the intersection between a room and the day.
> 
> So I'm looking at what is the best way to generate the grid. I can go the 
> "old way" of generating the HTML in code and just display it, somewhat like 
> EGWrapper does. But I don't think it's the best way to do it…
> 
> My main concern is how to fill out the intersection to check if the room is 
> taken or not. I have the code to do it, but the code requires that I send the 
> time period (day and hour) + the room name, and I have no idea on how I can 
> construct the table or divs so that when I build the intersection, I know 
> which room and period it is.
> 
> Opinions? Ideas?




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to