You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/06/28 15:38:24 UTC
[jira] [Commented] (TAP5-1885) Error in PropertyAccess service
[ https://issues.apache.org/jira/browse/TAP5-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14046857#comment-14046857 ]
ASF subversion and git services commented on TAP5-1885:
-------------------------------------------------------
Commit af6518b97e1ef307e64c1664115d67345a68d274 in tapestry-5's branch refs/heads/master from [~thiagohp]
[ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=af6518b ]
TAP5-1885: Error in PropertyAccess service
TAP5-1548: Property expressions fails when using a supertype that
implements an interface with a matching method
> Error in PropertyAccess service
> -------------------------------
>
> Key: TAP5-1885
> URL: https://issues.apache.org/jira/browse/TAP5-1885
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-ioc
> Affects Versions: 5.3.2
> Reporter: Alex Lumpov
> Fix For: 5.4
>
>
> package test.propertyaccess;
> import org.apache.tapestry5.ioc.Registry;
> import org.apache.tapestry5.ioc.RegistryBuilder;
> import org.apache.tapestry5.ioc.services.ClassPropertyAdapter;
> import org.apache.tapestry5.ioc.services.PropertyAccess;
> import org.apache.tapestry5.ioc.services.PropertyAdapter;
> public class App {
> public interface MyBeanInterface {
> int getValue();
> }
> public interface MyEditableBeanInterface extends MyBeanInterface {
> void setValue(int value);
> }
> public static void main(String[] args) {
> // init
> RegistryBuilder builder = new RegistryBuilder();
> Registry registry = builder.build();
> registry.performRegistryStartup();
> // get property adapter
> PropertyAccess propertyAccess = registry.getService(PropertyAccess.class);
> ClassPropertyAdapter classAdapter = propertyAccess.getAdapter(MyEditableBeanInterface.class);
> PropertyAdapter propertyAdapter = classAdapter.getPropertyAdapter("value");
> // print
> System.out.println(propertyAdapter.isRead() ?
> "value is readable" : "value is not readable");
> System.out.println(propertyAdapter.isUpdate() ?
> "value is updateable" : "value is not updateable");
> }
> }
> Output:
> value is readable
> value is not updateable
> Why?
--
This message was sent by Atlassian JIRA
(v6.2#6252)