Tapestry
  1. Tapestry
  2. TAPESTRY-2005

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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
        Priit Karu added a comment -

        Wow, that was fast..

        Thanks and Happy New Year.

        Show
        Priit Karu added a comment - Wow, that was fast.. Thanks and Happy New Year.
        Hide
        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
        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
        Priit Karu added a comment -

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

        Show
        Priit Karu added a comment - Attached simple maven2 example project to reproduce the problem (bug?)

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development