You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Bob Harner (Commented) (JIRA)" <ji...@apache.org> on 2012/03/28 14:20:27 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=13240367#comment-13240367 ] 

Bob Harner commented on TAP5-1885:
----------------------------------

Looks similar to TAP5-1493
                
> 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
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira