[jboss-user] [JBoss Seam] - How to uses DateTimeConverter in .page.xml parameter?

terryb do-not-reply at jboss.com
Wed Dec 19 22:01:16 EST 2007


I am in a process of upgrading to Seam 2GA; and getting this error I wasn't getting with Seam 1.2.1GA.

I have date/time fields on xhtml form; for which I set default values in page action. I am getting attached errors which appears to be related to date value conversion when writing to bean props.

I am not sure how to add converter to page paramter???

convertjavax.faces.convert.DateTimeConverter


  | .page.xml
  | ...
  |    <param name="settlementDateFrom" value="#{paymentReconciliation.settlementDateFrom}"/>
  |    <param name="settlementDateTo" value="#{paymentReconciliation.settlementDateTo}"/>
  | ...
  | 
  | 
  | Error: If without converter in page parameter 
  | ...
  | ERROR [SeamPhaseListener] uncaught exception
  | javax.el.ELException: java.lang.IllegalArgumentException: argument type mismatch
  | 	at javax.el.BeanELResolver.setValue(BeanELResolver.java:116)
  | 	at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:68)
  | 	at com.sun.faces.el.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:93)
  | 	at org.jboss.el.parser.AstPropertySuffix.setValue(AstPropertySuffix.java:73)
  | 	at org.jboss.el.parser.AstValue.setValue(AstValue.java:84)
  | 	at org.jboss.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
  | 	at org.jboss.seam.core.Expressions$1.setValue(Expressions.java:117)
  | 	at org.jboss.seam.navigation.Pages.applyConvertedValidatedValuesToModel(Pages.java:779)
  | ...
  | 
  | 
  | when adding converter, the error below occurs
  | 
  | ...
  |  <param name="settlementDateFrom" converterId="javax.faces.convert.DateTimeConverter" value="#{paymentReconciliation.settlementDateFrom}"/>
  |    <param name="settlementDateTo" converterId="javax.faces.convert.DateTimeConverter" value="#{paymentReconciliation.settlementDateTo}"/>
  | ...
  | 
  | 
  | FATAL [application] JSF1006: Cannot instantiate converter of type javax.faces.convert.DateTimeConverter
  | 11:51:56,045 WARN  [Param] could not create converter for: settlementDateTo
  | javax.faces.FacesException: Expression Error: Named Object: javax.faces.convert.DateTimeConverter not found.
  | 	at com.sun.faces.application.ApplicationImpl.createConverter(ApplicationImpl.java:726)
  | 	at org.jboss.seam.jsf.SeamApplication.createConverter(SeamApplication.java:112)
  | 	at org.jboss.seam.navigation.Param.getConverter(Param.java:52)
  | 
  | OR
  | ...
  |    <param name="settlementDateFrom" converterId="org.jboss.seam.ui.converter.DateTimeConverter" value="#{paymentReconciliation.settlementDateFrom}"/>
  |    <param name="settlementDateTo" converterId="org.jboss.seam.ui.converter.DateTimeConverter" value="#{paymentReconciliation.settlementDateTo}"/>
  | ...
  | 
  | FATAL [application] JSF1006: Cannot instantiate converter of type org.jboss.seam.ui.converter.DateTimeConverter
  | 11:58:57,301 WARN  [Param] could not create converter for: settlementDateFrom
  | javax.faces.FacesException: Expression Error: Named Object: org.jboss.seam.ui.converter.DateTimeConverter not found.
  | 	at com.sun.faces.application.ApplicationImpl.createConverter(ApplicationImpl.java:726)
  | 	at org.jboss.seam.jsf.SeamApplication.createConverter(SeamApplication.java:112)
  | 	at org.jboss.seam.navigation.Param.getConverter(Param.java:52)
  | 	at org.jboss.seam.navigation.Param.getStringValueFromModel(Param.java:142)
  | 	at org.jboss.seam.navigation.Pages.updateStringValuesInPageContextUsingModel(Pages.java:820)
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114495#4114495

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114495



More information about the jboss-user mailing list