BeanEditForm failing with custom validaton decorator
----------------------------------------------------

                 Key: TAP5-414
                 URL: https://issues.apache.org/jira/browse/TAP5-414
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.1.0.0, 5.0.18
            Reporter: Serge Eby


When using the BeanEditForm  with custom validation decorator, a runtime 
exception is thrown if the Field parameter is accessed in the insideLabel() 
method.

Here are sample exception and stack trace:

* java.lang.RuntimeException
No object of type org.apache.tapestry5.services.PropertyEditContext is 
available from the Environment. Available types are 
org.apache.tapestry5.RenderSupport, org.apache.tapestry5.ValidationDecorator, 
org.apache.tapestry5.ValidationTracker, 
org.apache.tapestry5.internal.services.ClientBehaviorSupport, 
org.apache.tapestry5.internal.services.DocumentLinker, 
org.apache.tapestry5.services.BeanEditContext, 
org.apache.tapestry5.services.FormSupport, 
org.apache.tapestry5.services.Heartbeat.

* Stack trace

        * 
org.apache.tapestry5.internal.services.EnvironmentImpl.peekRequired(EnvironmentImpl.java:73)
        * 
org.apache.tapestry5.corelib.pages.PropertyEditBlocks._$environment_read_context(PropertyEditBlocks.java)
        * 
org.apache.tapestry5.corelib.pages.PropertyEditBlocks.getNumberFieldValidator(PropertyEditBlocks.java:110)
        * 
org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:53)
        * 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(InternalComponentResourcesImpl.java:284)
        * 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(InternalComponentResourcesImpl.java:315)
        * 
org.apache.tapestry5.corelib.base.AbstractTextField._$read_parameter_validate(AbstractTextField.java)
        * 
org.apache.tapestry5.corelib.base.AbstractTextField.isRequired(AbstractTextField.java:230)
        * 
org.apache.tapestry5.integration.app1.ChattyValidationDecorator.insideLabel(ChattyValidationDecorator.java:89)
        * 
org.apache.tapestry5.internal.util.ValidationDecoratorWrapper.insideLabel(ValidationDecoratorWrapper.java:41)
        * org.apache.tapestry5.corelib.components.Label$1.run(Label.java:86)
        * 
org.apache.tapestry5.internal.services.HeartbeatImpl.end(HeartbeatImpl.java:49)
        * 
org.apache.tapestry5.corelib.components.Loop.endHeartbeat(Loop.java:391)
        * org.apache.tapestry5.corelib.components.Loop.after(Loop.java:382)
        * org.apache.tapestry5.corelib.components.Loop.afterRender(Loop.java)
        * 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$6$1.run(ComponentPageElementImpl.java:203)
        * 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:917)
        * 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$200(ComponentPageElementImpl.java:50)
        * 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$6.render(ComponentPageElementImpl.java:207)
        * 
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
        * 
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:121)
        * 
org.apache.tapestry5.services.TapestryModule$19.renderMarkup(TapestryModule.java:1200)
        * 
org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:1580)
        * 
org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:1561)
        * 
org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:1543)
        * 
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1525)
        * 
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1495)
        * 
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:64)
        * 
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:57)
        * 
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:59)
        * 
org.apache.tapestry5.services.TapestryModule$35.handle(TapestryModule.java:1779)
        * 
org.apache.tapestry5.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:92)
        * 
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:71)
        * 
org.apache.tapestry5.services.TapestryModule$17.service(TapestryModule.java:1029)
        * 
org.apache.tapestry5.integration.app1.services.AppModule$2.service(AppModule.java:89)
        * 
org.apache.tapestry5.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
        * 
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
        * 
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:621)
        * 
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:611)
        * 
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
        * 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93)
        * 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84)
        * 
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:83)
        * 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)
        * 
org.apache.tapestry5.services.TapestryModule$16.service(TapestryModule.java:1007)
        * 
org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
        * org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:179)
        * 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
        * 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361)
        * 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        * 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        * 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
        * org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
        * 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        * 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        * 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        * org.mortbay.jetty.Server.handle(Server.java:324)
        * 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
        * 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
        * org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
        * org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
        * org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
        * 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
        * 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org

Reply via email to