You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org> on 2007/02/16 03:59:05 UTC

[jira] Resolved: (TAPESTRY-1253) Meta injection throws exception unless property accessor is defined

     [ https://issues.apache.org/jira/browse/TAPESTRY-1253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Kuhnert resolved TAPESTRY-1253.
-------------------------------------

    Resolution: Fixed
      Assignee: Jesse Kuhnert

Ok ....Did two things. 

First was that injections of type meta with no previous "java property" equivalent will have a default type of Object, but this property is read only since you're using the very basic meta property type. (ie read only)

Added a new "meta:" binding that will hopefully be used in 97% of the cases like yours. It works in any sort of property syntax expression so it would be easy to specify it as the intitial-value to a normal property.

> Meta injection throws exception unless property accessor is defined
> -------------------------------------------------------------------
>
>                 Key: TAPESTRY-1253
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1253
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 4.0.2
>            Reporter: Ilya Zverev
>         Assigned To: Jesse Kuhnert
>             Fix For: 4.1.2
>
>
> .page:
>     <meta key="testMeta" value="123"/>
>     <inject property="testInject" object="testMeta" type="meta"/>
>     <component id="test" type="Insert">
>         <binding name="value" value="testInject"/>
>     </component>
> results in an exception:
> NullPointerException: Parameter clazz must not be null.
> Stack Trace: 
> org.apache.hivemind.util.Defense.notNull(Defense.java:41) 
> org.apache.tapestry.enhance.EnhancementOperationImpl.getClassReference(EnhancementOperationImpl.java:385)
> org.apache.tapestry.enhance.InjectMetaWorker.addObject(InjectMetaWorker.java:136) 
> org.apache.tapestry.enhance.InjectMetaWorker.injectMetaValue(InjectMetaWorker.java:96) 
> org.apache.tapestry.enhance.InjectMetaWorker.performEnhancement(InjectMetaWorker.java:62)
> ..etc...
> To avoid this exception an abstract getter method must be defined, like this:
> public abstract String getTestInject();

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org