Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1076

Wraped form components can't be attached to FieldLabels

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1
    • Fix Version/s: 4.1.1
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      I have a component witch wraps a tapestry "TextField".
      Something like this just as an example...

      .html

      <html>
      <body jwcid="$content$">
      <input jwcid="inputtext@TextField"/>
      </body>
      </html>

      .jwc

      <?xml version="1.0"?>
      <!DOCTYPE component-specification PUBLIC
      "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
      "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
      <component-specification allow-body="no" allow-informal-parameters="yes">
      </component-specification>

      If I use this component with a Label in a form like this...

      <form jwcid="form@Form">
      <label jwcid="@FieldLabel" field="component:comp1"/>
      <input jwcid="comp1@myTextField" displayName="Field description" value="ognl:data" />
      </form>

      I get the following error:

      "org.apache.tapestry.BindingException
      Error converting value for template parameter field: No type converter for type org.apache.tapestry.form.IFormComponent is available."

      Seems like it need the form component and is trying to get it as the parent of the inner TextField component, witch is not the form but my wrapper component. At least this is my guess.

      The full stacktrace...

      • org.apache.tapestry.coerce.ValueConverterImpl.coerceValue(ValueConverterImpl.java:105)
      • $ValueConverter_10d41ea6164.coerceValue($ValueConverter_10d41ea6164.java)
      • org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:91)
      • $FieldLabel_330.getField($FieldLabel_330.java)
      • org.apache.tapestry.valid.FieldLabel.renderComponent(FieldLabel.java:52)
      • org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:676)
      • org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:131)
      • org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:491)
      • org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:41)
      • org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:676)
      • org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:131)
      • org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:491)
      • org.apache.tapestry.form.FormSupportImpl.render(FormSupportImpl.java:495)
      • org.apache.tapestry.form.Form.renderComponent(Form.java:219)
      • org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:676)
      • org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:131)
      • org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
      • org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:676)
      • org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:131)
      • org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:491)
      • org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:41)
      • org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:676)
      • org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:131)
      • org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:491)
      • org.apache.tapestry.html.Body.renderComponent(Body.java:151)
      • org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:676)
      • org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:131)
      • org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:491)
      • org.apache.tapestry.html.Shell.renderComponent(Shell.java:64)
      • org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:676)
      • org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:131)
      • org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
      • org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:676)
      • org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:131)
      • org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
      • org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:676)
      • org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:129)
      • org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:248)
      • org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:402)
      • org.apache.tapestry.services.impl.DefaultResponseBuilder.renderResponse(DefaultResponseBuilder.java:117)
      • org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:33)
      • $ResponseRenderer_10d41ea6195.renderResponse($ResponseRenderer_10d41ea6195.java)
      • $ResponseRenderer_10d41ea6194.renderResponse($ResponseRenderer_10d41ea6194.java)
      • org.apache.tapestry.engine.HomeService.service(HomeService.java:68)
      • $IEngineService_10d41ea61fc.service($IEngineService_10d41ea61fc.java)
      • org.apache.tapestry.services.impl.EngineServiceInnerProxy.service(EngineServiceInnerProxy.java:77)
      • org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
      • org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:241)
      • org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
      • $WebRequestServicer_10d41ea61dd.service($WebRequestServicer_10d41ea61dd.java)
      • $WebRequestServicer_10d41ea61dc.service($WebRequestServicer_10d41ea61dc.java)
      • $WebRequestServicer_10d41ea61d9.service($WebRequestServicer_10d41ea61d9.java)
      • $WebRequestServicer_10d41ea61d8.service($WebRequestServicer_10d41ea61d8.java)
      • org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
      • $ServletRequestServicer_10d41ea61bf.service($ServletRequestServicer_10d41ea61bf.java)
      • $ServletRequestServicer_10d41ea61be.service($ServletRequestServicer_10d41ea61be.java)
      • org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
      • $ServletRequestServicerFilter_10d41ea61bb.service($ServletRequestServicerFilter_10d41ea61bb.java)
      • $ServletRequestServicerFilter_10d41ea61ba.service($ServletRequestServicerFilter_10d41ea61ba.java)
      • $ServletRequestServicer_10d41ea61c0.service($ServletRequestServicer_10d41ea61c0.java)
      • org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
      • $ServletRequestServicerFilter_10d41ea61b9.service($ServletRequestServicerFilter_10d41ea61b9.java)
      • $ServletRequestServicerFilter_10d41ea61b8.service($ServletRequestServicerFilter_10d41ea61b8.java)
      • $ServletRequestServicer_10d41ea61c0.service($ServletRequestServicer_10d41ea61c0.java)
      • org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
      • $ServletRequestServicerFilter_10d41ea61bd.service($ServletRequestServicerFilter_10d41ea61bd.java)
      • $ServletRequestServicerFilter_10d41ea61bc.service($ServletRequestServicerFilter_10d41ea61bc.java)
      • $ServletRequestServicer_10d41ea61c0.service($ServletRequestServicer_10d41ea61c0.java)
      • $ServletRequestServicer_10d41ea61b3.service($ServletRequestServicer_10d41ea61b3.java)
      • $ServletRequestServicer_10d41ea61b2.service($ServletRequestServicer_10d41ea61b2.java)
      • org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
      • org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:104)
      • javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      • javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      • org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      • org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      • org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      • org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      • org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      • org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      • org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      • org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      • org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
      • org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      • org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      • org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      • org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      • org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      • org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      • org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      • org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      • org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      • java.lang.Thread.run(Thread.java:595)

      If a full test case is required I could provide one.

        Attachments

          Activity

            People

            • Assignee:
              jkuhnert Jesse Kuhnert
              Reporter:
              pviegas Pedro Viegas
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: