[opencms-dev] News 2.1, One channel, 3 messages, no error, no output

Thomas Gagné tgagne at wideopenwest.com
Sat Feb 14 22:38:01 CET 2004


The problem is with dates.

In the example 
/system/modules/com.opencms.modules.homepage.news/templates/news.jsp, 
the author assembles a String date formated "yyyy-mm-dd", then uses it 
to fetch news articles:

    Iterator it = newsbean.getCurrentListByChannel(1,sdate).iterator();

I'm unsure what the format of the date is supposed to be, but this line 
doesn't work.  It wasn't until I changed the code to...

    Iterator it =
    newsbean.getCurrentListByChannel(1,"0000-00-00").iterator();

... that I got any of the headlines out.  As it is, I got them out in 
ascending order, not descending as I'd prefer.  I'll have to look around 
for documentation on how that might happen.

I did find some JavaDoc at 
<http://www.hema.ch/products/web/opencms/newsmodule_2_1/>.

Does anyone know why the authors didn't use Java's Date class?




More information about the opencms-dev mailing list