Monthly Archives: November 2007

Generating a calendar in JSF and Facelets

First, create a method called something like generateCalendar that will be called from your bean’s getter method: public void generateCalendar(){calendar = new ArrayList>(); GregorianCalendar c = new GregorianCalendar();c.setTime(startDate);// If today isn’t Sunday, set start date to the current week’s Sundayif(c.get(Calendar.DAY_OF_WEEK) … Continue reading

Posted in Uncategorized | Leave a comment

Iterating through a map in Java

I’ve always wanted to know the best way to iterate over the elements in a map. Here’s one way I’ve found that works:

Posted in Uncategorized | Leave a comment