0 Replies Latest reply on Nov 30, 2007 9:46 AM by Joel Meurisse

    a4j:loadBundle and f:convertDateTime

    Joel Meurisse Newbie

      h:outputText displays nothing when the output is formatted using f:convertDateTime when pattern comes from a bundle loaded with a4j:loadBundle

      in 'messages' bundle:
      in page:
      <a4j:loadBundle basename="bundle.messages" var="msg"/>
      <h:outputText id="testTimeFormatting" value="#{someBean.someDate}">
       <f:convertDateTime pattern="#{msg.timePattern}"/>
      <h:outputText value="#{msg.timePattern}"/>
      This displays only "HH:mm:ss" (the second outputText)
      getSomeDate() of someBean just returns new Date()

      The webapp runs (inside an ear) on jboss 4.2.2.GA using:

      myfaces 1.1.5
      tomahawk 1.1.6
      richfaces 3.1.2.GA
      facelets 1.1.13

      I tested on tomcat 5.5.25 too, same behaviour.

      I saw while debugging that the _pattern property of javax.faces.convert.DateTimeConverter is an empty string, hence getAsString() which returns prepareDateFormat().format(value) returns an empty string.

      The same code, but using f:loadBundle displays the server time as expected.