You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2010/10/17 08:44:25 UTC

[jira] Commented: (TAP5-921) Properties defined in an Interface are not exposed by PropertyAccess for abstract classes that do not directly implement the methods

    [ https://issues.apache.org/jira/browse/TAP5-921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921795#action_12921795 ] 

Hudson commented on TAP5-921:
-----------------------------

Integrated in tapestry-5.2-freestyle #210 (See [https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/210/])
    TAP5-921: Explicitly search interfaces when creating property adapters for abstract classes.


> Properties defined in an Interface are not exposed by PropertyAccess for abstract classes that do not directly implement the methods
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-921
>                 URL: https://issues.apache.org/jira/browse/TAP5-921
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.1.0.5
>            Reporter: Peter Rietzler
>            Assignee: Josh Canfield
>             Fix For: 5.2.2
>
>
> 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();
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.