Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-1734

Facelets: need metarule to convert String<-> Timezone for date converter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0.0-beta-1
    • 2.0.0-alpha-2
    • Facelets
    • None

    Description

      1. Modify the inputDate demo to specify timezone as a string on the converter, e.g.
      <tr:inputDate id="mdf8" value="#

      {date.date5}

      " label="attached converter with locale ja">
      <tr:convertDateTime locale="ja" type="date" dateStyle="full" timeZone="America/New_York"/>
      </tr:inputDate>

      2. Run the page with facelets enabled. Get the following runtime error:
      java.lang.IllegalArgumentException: Cannot convert America/New_York of type class java.lang.String to class java.util.TimeZone
      at com.sun.el.lang.ELSupport.coerceToType(ELSupport.java:381)
      at com.sun.el.ExpressionFactoryImpl.coerceToType(ExpressionFactoryImpl.java:66)
      at com.sun.faces.facelets.tag.BeanPropertyTagRule$LiteralPropertyMetadata.applyMetadata(BeanPropertyTagRule.java:81)
      at com.sun.faces.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:74)
      at javax.faces.view.facelets.MetaTagHandler.setAttributes(MetaTagHandler.java:122)
      at javax.faces.view.facelets.DelegatingMetaTagHandler.setAttributes(DelegatingMetaTagHandler.java:96)
      at com.sun.faces.facelets.tag.jsf.ConverterTagHandlerDelegateImpl.applyAttachedObject(ConverterTagHandlerDelegateImpl.java:126)
      at javax.faces.view.facelets.FaceletsAttachedObjectHandler.applyAttachedObject(FaceletsAttachedObjectHandler.java:91)
      at com.sun.faces.facelets.tag.jsf.ConverterTagHandlerDelegateImpl.apply(ConverterTagHandlerDelegateImpl.java:73)
      at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:114)

      Attachments

        1. trin2_1734.diff
          4 kB
          Yee-Wah Lee

        Activity

          People

            gabrielle Gabrielle Crawford
            yeelee Yee-Wah Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: