Hi This sounds reasonable, since String to TimeZone conversion is supported from tag class. It could be good to file an issue for this one.
regards Leonardo Uribe 2009/5/28 Guy Bashan <guy.bas...@gmail.com> > OK, now I understand the Exception... ;-) > It will be nice if String will be supported in ValueBinding as well... > > Thanks! > Guy. > > > On Wed, May 27, 2009 at 8:08 PM, Volker Weber <v.we...@inexso.de> wrote: > >> Hi Guy, >> >> the valuebinding should return a TimeZone object not a String. >> >> >> Regards, >> Volker >> >> 2009/5/27 Guy Bashan <guy.bas...@gmail.com>: >> > Hi all, >> > >> > I am trying to use f:convertDateTime with String value: >> > <h:outputText >> > value="#{cmp_summary.cmpCampaign.cmpDeliveryLimits.startDate}"> >> > <f:convertDateTime locale="#{appBean.userLanguageLocale}" >> > timeZone="#{cmp_summary.cmpCampaign.timeZone}" type="both" /> >> > </h:outputText> >> > >> > but I am getting this exception: >> > java.lang.IllegalArgumentException: Cannot convert Asia/Tokyo of type >> class >> > java.lang.String to class java.util.TimeZone >> > at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:380) >> > at >> > org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188) >> > at >> > >> org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101) >> > at >> > >> org.apache.myfaces.shared_impl.taglib.UIComponentELTagUtils.evaluateValueExpression(UIComponentELTagUtils.java:378) >> > at >> > >> org.apache.myfaces.taglib.core.ConvertDateTimeTag.setConverterTimeZone(ConvertDateTimeTag.java:213) >> > at >> > >> org.apache.myfaces.taglib.core.ConvertDateTimeTag.createConverter(ConvertDateTimeTag.java:137) >> > at >> javax.faces.webapp.ConverterELTag.doStartTag(ConverterELTag.java:62) >> > at >> > >> org.apache.myfaces.taglib.core.ConvertDateTimeTag.doStartTag(ConvertDateTimeTag.java:125) >> > at >> > >> org.apache.jsp.cmp_005fsummary_jsp._jspx_meth_f_005fconvertDateTime_005f1(cmp_005fsummary_jsp.java:11871) >> > at >> > >> org.apache.jsp.cmp_005fsummary_jsp._jspx_meth_h_005foutputText_005f149(cmp_005fsummary_jsp.java:11836) >> > at >> > >> org.apache.jsp.cmp_005fsummary_jsp._jspService(cmp_005fsummary_jsp.java:892) >> > at >> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> > at >> > >> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) >> > at >> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) >> > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> > at >> > >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) >> > at >> > >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> > at >> > >> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) >> > at >> > >> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) >> > at >> > >> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) >> > at >> > >> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) >> > at >> > >> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:341) >> > at >> > >> org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandlerImpl.java:486) >> > at >> > >> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:337) >> > at >> > >> org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100) >> > at >> > >> org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176) >> > at >> > >> org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41) >> > at >> > >> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140) >> > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:155) >> > at >> > >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) >> > at >> > >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> > at >> org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) >> > at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) >> > at >> > >> org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390) >> > at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517) >> > at >> > >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) >> > at >> > >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> > at >> > >> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:301) >> > at >> > >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) >> > at >> > >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> > at >> > >> com.todacell.ui.view.filter.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:97) >> > at >> > >> com.todacell.ui.view.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:61) >> > at >> > >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) >> > at >> > >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> > at >> > >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) >> > at >> > >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) >> > at >> > >> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) >> > at >> > >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) >> > at >> > >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) >> > at >> > >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) >> > at >> > >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) >> > at >> > >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) >> > at >> > >> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) >> > at >> > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) >> > at java.lang.Thread.run(Thread.java:619) >> > >> > Is it a bug? When I pass a direct string it all works ok. >> > >> > Thanks, >> > Guy. >> > >> > >> > >> >> >> >> -- >> inexso - information exchange solutions GmbH >> Bismarckstraße 13 | 26122 Oldenburg >> Tel.: +49 441 4082 356 | >> FAX: +49 441 4082 355 | www.inexso.de >> > >