7 Replies Latest reply on Jun 28, 2007 10:51 AM by pippin1966

    <s:selectDate> and i18n

    pippin1966

      Hi,

      I've been working with Seam for two weeks now and I think it's a great framework. It's incredible the amount of functionality it can do with so little code :-)

      I have a problem with one of the Seam jsf controls: <s:selectDate>

      ¿Is there anyway to i18n this control? I need:

      (a) First day of the week must be Monday not Sunday
      (b) The literals, I need spanish literals
      (c) It seems there is a bug in this control, always formats de date using MM/dd/yyyy

      Thanks in advance and congratulations for your great work (chapeau ;-)

        • 1. Re: <s:selectDate> and i18n
          dajevtic

          funny pippin, I was just typing a similar question:
          Can't help you out in the first two questions, but what I did notice, is that the control formats MM/dd/yyyy after redeployments. If I do a fresh start of the app server, the control formats everything correctly.
          Do you experience the same problem?

          • 2. Re: <s:selectDate> and i18n
            pmuir

            (a) This is possible in Seam2
            (b) What literals?
            (c) What pattern are you providing in s:convertDate Time

            • 3. Re: <s:selectDate> and i18n
              damianharvey

              If you render the date control via Ajax (eg. Ajax4JSF) then the format will always be MM/dd/yy. Would this apply to you?

              • 4. Re: <s:selectDate> and i18n
                dajevtic

                Yes, damian. Thanks for the hint. I include the tag via a4j:include in a richfaces modal dialog.
                Is there a way around this?

                • 5. Re: <s:selectDate> and i18n
                  pippin1966

                   

                  "pete.muir@jboss.org" wrote:
                  (a) This is possible in Seam2
                  (b) What literals?
                  (c) What pattern are you providing in s:convertDate Time


                  (a) OK, thanks
                  (b) Sunday -> Domingo, Monday -> Lunes, etc
                  (3) Now it's working OK, very strange. Even if I redeploy. This is a fragment of the xhtml file

                  <s:decorate id="entradaBancoDecoration" template="layout/edit.xhtml">
                  <ui:define name="label">Fecha entrada</ui:define>
                  <h:inputText value="#{expediente.entradaBancoDt}" id="entradaBancoDt">
                  <s:convertDateTime pattern="dd/MM/yyyy"/>
                  </h:inputText>
                  <s:selectDate for="entradaBancoDt" startYear="1990" endYear="2030" dateFormat="dd/MM/yyyy">

                  </s:selectDate>
                  </s:decorate>

                  And thanks erverybody for your replies

                  • 6. Re: <s:selectDate> and i18n
                    pmuir

                    So, that comes froms the locale (if set) - set your locale, you should get it localised.

                    • 7. Re: <s:selectDate> and i18n
                      pippin1966

                       

                      "pete.muir@jboss.org" wrote:
                      So, that comes froms the locale (if set) - set your locale, you should get it localised.


                      You were right Pete. Everything it's OK now, even Monday it's the first day of the week. Thanks a lot