Tapestry 5
  1. Tapestry 5
  2. TAP5-921

Properties defined in an Interface are not exposed by PropertyAccess for abstract classes that do not directly implement the methods

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.5
    • Fix Version/s: 5.2.2
    • Component/s: tapestry-ioc
    • Labels:
      None

      Description

      Here is a simple example:

      public interface HasName

      { String getName(); }

      public abstract class AbstractBean implements HasName {
      }

      public class TestPage {

      @Property
      private AbstractBean bean;

      public void onActivate() {
      bean = new AbstractBean() {
      public void setName(String name) {
      }
      };
      }
      }

      TestPage.tml
      ...
      <h1>$

      {bean.name}

      </h1>
      ...

      Error message is:

      Exception assembling root component of page manager/tools/TestPage: Could not convert 'bean.name' into a component parameter binding: Class smarter.ecommerce.smeco.manager.pages.tools.AbstractBean does not contain a property named 'name' (within property expression 'bean.name'). Available properties: class, componentResources.

      Everything works fine if I change the bean class to:

      public abstract class AbstractBean implements HasName

      { public abstract String getName(); }

        Activity

        Peter Rietzler created issue -
        Josh Canfield made changes -
        Field Original Value New Value
        Assignee Josh Canfield [ joshcanfield ]
        Josh Canfield made changes -
        Summary Cannot reference property from property expression if backing type is abstract and property is defined in interface Properties defined in an Interface are not exposed by PropertyAccess for abstract classes that do not directly implement the methods
        Fix Version/s 5.2.2 [ 12315376 ]
        Component/s tapestry-ioc [ 12312469 ]
        Component/s tapestry-core [ 12312470 ]
        Josh Canfield made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Josh Canfield made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Josh Canfield
            Reporter:
            Peter Rietzler
          • Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development