A Few Site Updates June 26, 2005
For the last day and a half, I put some pretty major work into this website. However, the only parts you'll see are in the comments section, and now a News post can have multiple categories associated with it. The thing about the last one is it's not easy at all. You need a few things.
#1 Table structure
#2 Change all your code that uses just a Subject in the news table
#3 Create a dual select box (which I needed anyway)
#4 Create a data list control to list each subject associated with that news post underneath it.
Numbers 1 and 2 were simple, but time consuming. However, numbers 3 and 4, with a new technology and very little documentation out there to go on, can be particularly daunting tasks. In the end, the amount of code written was not at all proportional to the amount of time spent on it, but that's usually the case in Computer Science and programming. You think and think and think, then the easy work begins, unless of course you're using a technology that you aren't too familiar with, like JavaServer Faces. I've written web controls in the technology before. The menu control, for instance, and the calendar control. However, unlike the menu and calendar controls, the Dual Select list is an input control, and the Data List control is an interation control, neither of which I had developed in JSF, up until this weekend.
Here is what the dual select list looks like:
And here is the short amount of JSP code that writes out all of the categories under a news post.
Now the code to "plop" a dual select list onto a page
Simple.
Now I just have to go through all of my news posts and properly categorize them. I'd rather drink gravel.