3 Replies Latest reply on Jan 25, 2008 3:55 AM by nickarls

    convert parameter f:param with s:convertdatetime

      I have a simple page that I am trying to pass a date parameter to:

       <s:button view="/RptphdmgbinderEdit.xhtml"
       value="Create rptphdmgbinder">
       <f:param name="policyeffdate" value="#{policy.effectiveDate.time}" rendered="#{policy.effectiveDate!=null}"></f:param>

      The date does get passed to the next page, but it is not in the format I want. I have tried to do something like:

      <f:param name="policyeffdate" value="#{policy.effectiveDate.time}" rendered="#{policy.effectiveDate!=null}">
      <s:convertDateTime pattern="MM/dd/yyyy"/>

      But this does not work. Other than adding a conversion method to my policy class is there any way and can make the date get passed according to the "MM/dd/yyyy" pattern. It seems like a pretty simple problem to solve, but I just can't figure this out. I was thinking there might be a way to do this with EL, but I am still a bit new at this. Any thoughts would be appreciated.