myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bart Kummel <b...@kummelweb.nl>
Subject Re: [Trinidad] Problem with <tr:validateDateRestriction> on Facelets
Date Thu, 19 Feb 2009 07:37:02 GMT
Hi,

Has anyone an idea about what's going wrong here? Matthias?

Regards,
Bart

On Sat, Feb 14, 2009 at 12:24, Bart Kummel <bart@kummelweb.nl> wrote:

> Hi,
>
> I'm trying to use the <tr:validateDateRestriction> component to restrict
> an input date to working days. So I set the invalidDaysOfWeek attribute to
> "sat sun". But then I get the following stack trace. (In fact I get this
> stack trace no matter what the contents of the string are.)
>
> javax.faces.FacesException: Cannot find FacesContext.
> at
> com.sun.faces.application.ConverterPropertyEditorBase.setAsText(ConverterPropertyEditorBase.java:103)
>  at com.sun.el.lang.ELSupport.coerceToType(ELSupport.java:377)
> at
> com.sun.el.ExpressionFactoryImpl.coerceToType(ExpressionFactoryImpl.java:66)
>  at
> com.sun.facelets.tag.BeanPropertyTagRule$LiteralPropertyMetadata.applyMetadata(BeanPropertyTagRule.java:45)
> at com.sun.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:36)
>  at
> com.sun.facelets.tag.MetaTagHandler.setAttributes(MetaTagHandler.java:62)
> at com.sun.facelets.tag.jsf.ValidateHandler.apply(ValidateHandler.java:98)
>  at
> com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
> at com.sun.facelets.tag.UserTagHandler.apply(UserTagHandler.java:122)
>  at
> com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:310)
> at
> com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:280)
>  at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
> at
> com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
>  at
> com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
> at
> com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
>  at
> com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:119)
> at
> com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
>  at
> com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
> at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
>  at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
> at
> com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:241)
>  at com.sun.facelets.tag.UserTagHandler.apply(UserTagHandler.java:98)
> at
> com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
>  at
> com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
> at
> com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
>  at
> com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
> at
> com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
>  at
> com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)
> at
> com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:131)
>  at
> com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:310)
> at
> com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:280)
>  at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
> at
> com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
>  at
> com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
> at
> com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
>  at
> com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
> at
> com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
>  at
> com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
> at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
>  at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
> at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
>  at
> com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:144)
> at
> com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
>  at
> com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
> at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
>  at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
> at
> com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)
>  at
> com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
> at
> javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:48)
>  at
> org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:188)
> 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.servletService(ApplicationFilterChain.java:411)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
> at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:238)
>  at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:195)
> at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138)
>  at
> org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
>  at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
>  at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
>  at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
>  at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
>  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
>  at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
>  at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
>  at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
>  at
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
>  at
> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
> at
> com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
>
> I saw the same behaviour with the <tr:validateDateTimeRange>, when I tried
> to set the minimum and maximum attributes with a literal string in the"yyyy-MM-dd"format.
I worked around that by using an expression that evaluates to a
> java.util.Date. So I tried the same solution here, except that the
> expression now evaluates to a java.lang.String[] with the following
> contents: {"sat", "sun"}. When I do that, I don't get the exception and my
> page is rendered fine. But the validation is not working at all, I can still
> input dates that are on saturday or sunday. Am I doing something wrong, or
> should I file a bug?
>
> I'm using Trinidad 1.2.10, MyFaces core 1.2.4, Facelets 1.1.14 on a
> Glassfish v2 server.
>
> Best regards,
> Bart Kummel <http://www.bartkummel.net>

Mime
View raw message