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

Using component classes as component parameters fails (Could not find a coercion)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.7
    • Fix Version/s: 5.0.8
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      We need to use inside one Tapestry component a parameter which value type is another component class (in the example bug.components.TestComponent). When binding this parameter it fails with an error message: "Could not find a coercion from type bug.components.TestComponent to type bug.components.TestComponent.".

      It seems that at runtime the component classes do not match (some bytecode manipulation probably).

      Are we doing something incorrectly or it is not allowed to define parameters which type is some other component class?

        Activity

        Hide
        karu Priit Karu added a comment -

        Attached simple maven2 example project to reproduce the problem (bug?)

        Show
        karu Priit Karu added a comment - Attached simple maven2 example project to reproduce the problem (bug?)
        Hide
        hlship Howard M. Lewis Ship added a comment -

        I do believe this to be a bug.

        A simple work-around would be to define an interface, in a non-controlled package, and use that for the parameter type (and be sure the passed parameter is assignable to the interface type).

        Show
        hlship Howard M. Lewis Ship added a comment - I do believe this to be a bug. A simple work-around would be to define an interface, in a non-controlled package, and use that for the parameter type (and be sure the passed parameter is assignable to the interface type).
        Hide
        karu Priit Karu added a comment -

        Wow, that was fast..

        Thanks and Happy New Year.

        Show
        karu Priit Karu added a comment - Wow, that was fast.. Thanks and Happy New Year.

          People

          • Assignee:
            hlship Howard M. Lewis Ship
            Reporter:
            karu Priit Karu
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development