It was on the 2nd of Feb 2009 that I came across the issue with jsf calendar component. The issues was due to the calendar renderer class rendering only four rows of the dates as all dates fitted within that, hence the javascript error for the missing row. The quick get around over this was to add an additional row if there was only four rows.
This will be a recurring issues when all dates of feb fits perfectly on four rows of the calendar.
You can download the webui.jar with the updated CalendarMonthRendered.class on the link below.
http://www.turboupload.com/files/get/6X_JJlLLRR/webui.jar
Code added on CalendarMonthRenderer.java is as below
if(rowNum==4)
{
writer.startElement(“tr”, calendarMonth);
String rowId = rowIdPrefix + rowNum++;
writer.writeAttribute(“id”, rowId, null);
writer.write(“\n”);
for(int i = 0; i < 7; i++)
{
boolean selected = calendarMonth.isDateSelected(startDate, endDate);
boolean dayInMonth = startDate.get(2) == displayedMonth;
String style = styles[19];
if(selected)
{
if(dayInMonth)
style = styles[20];
else
style = styles[21];
} else
if(dayInMonth)
if(calendarMonth.compareDate(startDate, todaysDate))
style = styles[22];
else
style = styles[18];
renderDateLink(startDate, style, dateLinkPrefix.concat(String.valueOf(dateLinkId)), calendarMonth, writer);
dateLinkId++;
startDate.add(6, 1);
startDate.getTime();
}
writer.endElement(“tr”);
}
Hope this save a trouble for few.
Hi,
Can you please provide me for JSF 1.1 also.
Thanks in advance.
By: Rao on February 5, 2009
at 1:51 am
it worked for me … thanks alot
By: Rao on February 5, 2009
at 2:07 am
Im unable to download the jar you had uploaded. Can you please mail me to shivaji.byrapaneni@gmail.com
By: Shivaji on February 5, 2009
at 3:22 am
we found one more bug in this jar.
ERROR – Calendar is allowing to select back date, but when we click on any button it is not submitting the page and displays a msg ‘Select a date after 05/02/2009 ‘
By: Rao on February 5, 2009
at 7:07 am
Rao, maybe you should try checking your code. See if your date range properties are set as required.
By: Reisang Risom on February 5, 2009
at 8:34 am
could not download the file.throwing JS error on the download link
By: srini on February 5, 2009
at 9:48 am
Hi srini, try downloading using a different browser. That will help.
By: Reisang Risom on February 5, 2009
at 8:22 pm
please provide the link
By: srini on February 5, 2009
at 9:49 am
Hi
Thanks for the update. It works for date, but I was having problems with tab set, it was not working. In order to update just calendar class, it is best just to replace class CalendarMonthRenderer from new jar to the old jar (webui.jar) that you have in rave folder. It works for me. Btw, can anyone show me some tutorial where I can migrate my projects from rave to woodstock.
Thanks in advance
Pero Gjuzelov
By: Pero on February 5, 2009
at 11:56 am
hi
we are using jsf 1.1.02, will it work for this version?
we have added message for calendar to display validation messages.
By: Rao on February 6, 2009
at 2:53 am
Thanks a lot..
It really did helped a lot..
Keep up the good job…
By: Ravi on February 6, 2009
at 12:43 pm
Hi, great post and thanks for the info, since we have the same problem, problem is we use webui-jsf.jar will your solution still work or de we have to recompile the webui-jsf.jar
By: Mat on February 6, 2009
at 3:37 pm
Thank Reisang.I downloaded the jar.
If we use the jar as the whole it is throwing validation errors of component.As Pero said , the best thing is to replace the CalendarMonthRenderer class and create jar using the updated class.
By: srini on February 9, 2009
at 2:26 am
Hi, is the webui.jar file that is being downloaded compiled using java 1.5 as opposed to 1.4? My app is deployed on websphere using java1.4 and I see a version 49.0 error when using the new webui.jar file.
Cheers
By: kingyhunter on February 11, 2009
at 1:16 am
Hi..I am not able to download this jar file…Plz give another link or mail me at
mandar9898@gmail.com
By: mandar on February 12, 2009
at 5:18 am
I downloaded the above .jar file and the calendar pop-up came back, but so did a 500 error everytime I try to save the date now. Suggestions?
By: Brad Oleson on February 12, 2009
at 10:08 pm
Hi.
Thanks for this great post.
Can you please send me the jar file.
I couldn’t download from the link you have provided above.
My email is karen_05182002@yahoo.com.
Thank you.
By: Karen on February 18, 2009
at 11:03 pm
Hello:
I had exactly the same problem this Feb. I hope you post will solve my problem. I wonder how did you get the java source file. In web.ui-src.zip, there is not this java file. Did you decompiler the java with a decompiler?
I wionder if you could send me the original java source for the whole web.ui.jar.
thanks a lot. You did great job.
John
By: John on February 20, 2009
at 8:05 pm