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

        Priit Karu created issue -
        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?)
        Priit Karu made changes -
        Field Original Value New Value
        Attachment simpleExample.ZIP [ 12372360 ]
        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).
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 5.0.8 [ 12312898 ]
        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.
        Mark Thomas made changes -
        Workflow jira [ 12420018 ] Default workflow, editable Closed status [ 12567465 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12567465 ] jira [ 12590414 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        11h 55m 1 Howard M. Lewis Ship 01/Jan/08 00:11
        In Progress In Progress Closed Closed
        19h 22m 1 Howard M. Lewis Ship 01/Jan/08 19:33

          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