tags:

views:

30

answers:

1

I am trying to implement a search feature of an instrument reservation table using JDBC and jSP, a reservation is identified by a date and a sequence number of the time slot on that date (if the time slot is 1 hour then there are are 24 possible sequence number) and a number of time slots. now a user should be able to search for the closest k available time slots, but I am not sure about what I need to display to the user, because there could be a large number of available time slots, I thought about displaying the date at which he may start reserving k consecutive time slots until the maximum time for which there's a reservation for a specified instrument, but if he wishes to make a reservation past this date then he may enter his reservation in a text box, but it doesn't sound so intuitive to tell the user to do it, so i was looking for a more intuitive design. also how do i go about telling him that certain instruments are not reserved at all so he may reserving them right away? ( I used left outer join between the instruments table and the reservedInstruments table to include instruments that were never reserved). if someone please has an idea about an intuitive design.

also, how do I go about enabling the displayed search results to be checked for reservation? what I have is this in my jsp code:

<caption>this table displays the earliest time slot after which you can make an instrument
reservation of the specified type</caption>
<tr>
<th>Instrument ID</th>
<th>date</th>
<th>sequence number</th>
<th>number of slots</th>
</tr>
 <c:forEach items="${instRecords}" var="timeSlot">
        <tr>
            <td>${timeSlot.instrId}</td>
            <td>${timeSlot.date}</td>
            <td>${timeSlot.seqNum}</td>
            <td>${timeSlot.slotsNumber}</td>
        </tr>
    </c:forEach>
</table>

and in the servlet I have the following code:

List<TimeSlot> reservations = dbManager.searchInstrument(instType, slotsNum);
  request.setAttribute("instRecords", reservations);
  getServletContext().getRequestDispatcher("showInstruments.jsp").forward(request, response);

I know that this is long, thanks for anyone taking the time to read/& or answer this.

A: 

Why not let the user request a day then show a grid with plus and minus three days as the vertical axis and timeslots as horizontal axis so you show all the timeslots for 7 days indicating which are booked and which are free. Give the user an option to move forward or back in the calendar.

Jaydee