Results 1 to 2 of 2
  1. #1
    zazzko is offline Member
    Join Date
    Feb 2009
    Rep Power

    Default JSF Calendar Component JS error

    Hi everyone,
    I have problem with JSF Calendar component. JSP version is 1.2 so we are using com.sun.rave.web.ui.component.Calendar class.

    When HTML code is generated some id missing. For example:
    JavaScript tries to find subForm:startCalendar:_datePicker:row5, but there is only subForm:startCalendar:_datePicker:row4.

    This cause JS error at line 249 in calendar.js:

    Java Code:
    this.lastRow = document.getElementById(rowId);
    ... = "none"; //error is here this.lastRow is null
    After few reloads and manual date change calendar seem to work fine for a while, but it can stop at anytime. There are no errors in Tomcat logs (we are using Tomcat 5.5, but we have same error with Glassfish 2).

    Here is JSP code:

    Java Code:
    <ui:calendar binding="#{Index.startCalendar}" dateFormatPattern="dd.MM.yyyy" id="startCalendar" style="position: absolute; left: 120px; top: 96px"/>

  2. #2
    Join Date
    Feb 2009
    Rep Power

    Default Due to February 2009 and code

    The component is breaking, because it assumes 5 rows of days. I set my server
    date to march first and the component works. February 2009 has 28 eight days an
    starts on Sunday. Next time February will be broken is 2015 and then not till

    Sorry, I do not have a code fix.

Similar Threads

  1. Replies: 4
    Last Post: 01-05-2011, 04:00 PM
  2. JSF datatable with calendar component
    By thilak in forum JavaServer Faces (JSF)
    Replies: 3
    Last Post: 06-25-2009, 08:53 AM
  3. Replies: 1
    Last Post: 08-07-2007, 08:53 AM
  4. Same component on all JTabbedPane
    By java_novice in forum AWT / Swing
    Replies: 4
    Last Post: 08-06-2007, 10:09 AM
  5. Help with custom component
    By Falcon1 in forum AWT / Swing
    Replies: 8
    Last Post: 07-21-2007, 01:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts