Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.1.7-SNAPSHOT
    • Fix Version/s: 1.1.7
    • Component/s: Calendar
    • Labels:
      None
    • Environment:
      Linux, Trinidad, JSF RI 1.2

      Description

      Dec 11.

      New version of snapshot changed class type for Calendar?

      log: org.apache.myfaces.custom.date.HtmlInputDate cannot be cast to org.apache.myfaces.custom.calendar.HtmlInputCalendar

      My Facelets taglib is

      <tag-name>inputCalendar</tag-name>
      <component>
      <component-type>org.apache.myfaces.HtmlInputCalendar</component-type>
      <renderer-type>org.apache.myfaces.Calendar</renderer-type>
      </component>

      this is according your documentation http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk
      it worked with previous version.

      Do I need in taglib change the type?

      Is that something else?

      1. html-calendar-renderer-fix.patch
        2 kB
        Paul Lorenz
      2. popcalendar-js-fix.patch
        0.7 kB
        Paul Lorenz
      3. core-pom-fix.patch
        0.5 kB
        Paul Lorenz

        Activity

        Hide
        Leonardo Uribe added a comment -

        duplicated of

        TOMAHAWK-1209 HtmlCalendar.getLocalizedLanguageScript called form HtmlDateRenderer throws ClassCastException

        and

        TOMAHAWK-1210 this.stdDateFormatter javascript is null

        Show
        Leonardo Uribe added a comment - duplicated of TOMAHAWK-1209 HtmlCalendar.getLocalizedLanguageScript called form HtmlDateRenderer throws ClassCastException and TOMAHAWK-1210 this.stdDateFormatter javascript is null
        Hide
        Leonardo Uribe added a comment -

        This issue presents two different problems.

        I think this is related to:

        TOMAHAWK-1209 HtmlCalendar.getLocalizedLanguageScript called form HtmlDateRenderer throws ClassCastException

        and

        TOMAHAWK-1210 this.stdDateFormatter javascript is null

        Each one has already been fixed with similar solutions as presented.

        I have also checked the working of inputDate and everything is fine.

        If no objections I'll close this issue as duplicated

        Show
        Leonardo Uribe added a comment - This issue presents two different problems. I think this is related to: TOMAHAWK-1209 HtmlCalendar.getLocalizedLanguageScript called form HtmlDateRenderer throws ClassCastException and TOMAHAWK-1210 this.stdDateFormatter javascript is null Each one has already been fixed with similar solutions as presented. I have also checked the working of inputDate and everything is fine. If no objections I'll close this issue as duplicated
        Hide
        Paul Lorenz added a comment -

        These are the changes I had to make to get the inputDate component to work (and tomahawk to even build).

        The first patch removes and unconditional cast in HtmlCalendarRenderer to HtmlInputCalendar. Since this is used by both HtmlInputDate and HtmlInputCalendar, the unconditional cast breaks things.

        The second patch adds an initialization of the stdDateFormatter to popcalendar.js. Without that I was getting a js error when clicking on the button next to the date input.

        The last is patch to the pom.xml adding that beanutils is required to build. It wouldn't build without that.

        This is running on Jboss 4.2 with the bundled JSF 1.2 RI on linux.

        Show
        Paul Lorenz added a comment - These are the changes I had to make to get the inputDate component to work (and tomahawk to even build). The first patch removes and unconditional cast in HtmlCalendarRenderer to HtmlInputCalendar. Since this is used by both HtmlInputDate and HtmlInputCalendar, the unconditional cast breaks things. The second patch adds an initialization of the stdDateFormatter to popcalendar.js. Without that I was getting a js error when clicking on the button next to the date input. The last is patch to the pom.xml adding that beanutils is required to build. It wouldn't build without that. This is running on Jboss 4.2 with the bundled JSF 1.2 RI on linux.
        Hide
        Tomas Cerny added a comment -

        OK I took a bad look

        I am using

        <t:inputDate type="date" value="#

        {value}

        " required="#

        {required}

        "
        id="#

        {fieldName}

        " styleClass="#

        {inputClass}

        "
        immediate="#

        {immediate}

        " popupCalendar="true">
        <ui:insert />
        </t:inputDate>

        taglib

        <tag>
        <tag-name>inputDate</tag-name>
        <component>
        <component-type>org.apache.myfaces.HtmlInputDate</component-type>
        <renderer-type>org.apache.myfaces.Date</renderer-type>
        </component>
        </tag>

        it throws

        org.apache.myfaces.custom.date.HtmlInputDate cannot be cast to org.apache.myfaces.custom.calendar.HtmlInputCalendar

        So the component problem is inputDate not inputCalendar

        Show
        Tomas Cerny added a comment - OK I took a bad look I am using <t:inputDate type="date" value="# {value} " required="# {required} " id="# {fieldName} " styleClass="# {inputClass} " immediate="# {immediate} " popupCalendar="true"> <ui:insert /> </t:inputDate> taglib <tag> <tag-name>inputDate</tag-name> <component> <component-type>org.apache.myfaces.HtmlInputDate</component-type> <renderer-type>org.apache.myfaces.Date</renderer-type> </component> </tag> it throws org.apache.myfaces.custom.date.HtmlInputDate cannot be cast to org.apache.myfaces.custom.calendar.HtmlInputCalendar So the component problem is inputDate not inputCalendar

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Tomas Cerny
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development