Been trying for a while to figure this out, but getting very confused between different tutorials, sorry.
I am trying to build an event calendar.
I need to show data from a table in my database, in a JSF page, but not show the whole of the table, just the data for that date. I have managed to get a table to show all the events in my events table, but cannot seem to find a way that will let me show just the events for one date ( a date which needs to be able to be changed so that it can show all the events for Sunday in one display, all the events for Monday in a different display elsewhere on the page, and so on). The events shown need to be selectable in some manner. I worked out how to do it putting in a table, or putting in a listbox, but only showing *all* the events, not just for that date.
I only have a couple of weeks left to get this finished and written up and sent in ( its for part of my 3rd year dissertation and I've had an extension already)...so I could really use something that will give me some idea where to start please.
Is there any tutorial or similar out there that will take me very simply through how it should work?
Or is there (hopefully!) some really simple answer I am missing?
1. Filter your data retrieval. If you don't fetch the data, the table won't display it.
2. Filter the results. A lot of people think that the only way to present database data is to wrap the entire result set. But you can also create a results subset as a collection object and wrap it, instead. It's a little more overhead that way, but not much, and it's better than doing everything by brute force.
If you're using an ORM to manage database persistence (you used the term table, so I'd presuming that this is database data), a filtered query result set basically does #1 and #2 for you as part of the same operation.
An IDE is no substitute for an Intelligent Developer.
Joined: May 17, 2009
Thanks.. So, if you don't mind, how do I go about doing that please? or where can I go to find out? I'm sorry, I really do not know very much about this. I tried typing filtered query result set into Netbeans help but didnt find anything I understood what to do with