0 Replies Latest reply on Oct 13, 2009 3:42 PM by Y E

    f:param not passing date type for @RequestParameter

    Y E Newbie

      Hello,


      I came across a problem when passing a date type using f:param.


      I have the following in my page:



      <rich:column sortBy="#{_inc.incIgnore}">
           <f:facet name="header">Ignore</f:facet>                    
           <h:selectBooleanCheckbox value="#{_inc.incIgnore}" >
           <a:support event="onclick" action="#{incHome.toggleIgnore}" >
                     <f:param name="pIncId" value="#{_inc.id.incId}"/>
                       <f:param name="pIncDate" value="#{_inc.id.incDate}" />
              </a:support>
           </h:selectBooleanCheckbox>
      </rich:column>     







      and the following in my incHome class:


      Code:




      @RequestParameter
      String pIncId;
           
      @RequestParameter
      Date pIncDate;
           
      public String toggleIgnore()
      {
           if(pIncId==null || pIncDate==null) return "";
           String logDetail;
           // do something
      }



           




      In my pages-config.xml I have this


      Code:




      <converter>
        <converter-for-class>java.util.Date</converter-for-class>
        <converter-class>javax.faces.convert.DateTimeConverter</converter-class>
      </converter>



           


      The problem is that the pIncDate field doesn't seem to be passed back to incHome. It's always null.


      I did notice this line in the log file though




      [org.ajax4jsf.renderkit.AjaxRendererUtils] Build onclick string for component j_id388 as A4J.AJAX.Su
      bmit('_viewRoot','incsChildren',event,{'status':'waitStatus','similarityGroupingId':'incsChildren:in
      csTable:4:j_id388','parameters':{'pIncId':'125','pIncDate':{'date':8,'day':5,'hours':6,'minutes':26,
      'month':4,'nanos':0,'seconds':43,'time':1241760403000,'timezoneOffset':-60,'year':109} ,'incsChildre
      n:incsTable:4:j_id388':'incsChildren:incsTable:4:j_id388'} ,'actionUrl':'/TEST/IncEdit.seam'} )     



      which, if I'm reading it correctly, suggests that the value is passed to the home component.


      I did some googling and it seems that other people had the same problem, but I wasn't able to find a solution so far.


      Does anyone know if there's a fix for this problem or a workaround? I'm really stuck with this issue and any help will be highly apreaciated.


      I'm using richfaces 3.3.1GA with Seam 2.1.1 GA


      Thanks.