You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2014/05/27 09:21:02 UTC

[jira] [Updated] (TAP5-191) Tapestry's understanding of generics is limited to getter and setter methods; it does not understand generics as parameters to event handler methods such as onActivate()

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

Jochen Kemnade updated TAP5-191:
--------------------------------

    Labels: bulk-close-candidate  (was: )

This issue has been last updated about 1.5 years ago, has no assignee, affects an old version of Tapestry that is not actively developed anymore, and is therefore prone to be bulk-closed in the near future.

If the issue still persists with the most recent development preview of Tapestry (5.4-beta-6, which is available from Maven Central), please update it as soon as possible. In the case of a feature request, please discuss it with the Tapestry developer community on the dev@tapestry.apache.org mailing list first.


> Tapestry's understanding of generics is limited to getter and setter methods; it does not understand generics as parameters to event handler methods such as onActivate()
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-191
>                 URL: https://issues.apache.org/jira/browse/TAP5-191
>             Project: Tapestry 5
>          Issue Type: Improvement
>    Affects Versions: 5.0.15
>            Reporter: Angelo Chen
>            Priority: Minor
>              Labels: bulk-close-candidate
>
> Hi, 
> I'm trying out generic in 5.0.11, I have a base class ObjectEdit, then 
> public class ObjectEdit<T> { 
>     private T object; 
>     public T getObject() { return object;} 
>     public void setObject(T object) { this.object = object;} 
>     public void onActivate(T obj) { object = obj;} 
>     public T onPassivate() { return object; } 
> } 
> I was hoping that I can just extend it like this: 
> public class UserEdit extends ObjectEdit <Usr> { 
> } 
> but it does not work, error: 
> org.apache.tapestry.ioc.internal.util.TapestryException 
> Failure reading parameter 'object' of component admin/UserEdit:object: java.lang.String 
> I have to do: 
> public class UserEdit extends ObjectEdit <User> { 
>      public void onActivate(User obj) { 
>         this.setObject(obj); 
>     } 
> } 
> and remove the onActivate from ObjectEdit, why onActivate does not work in a base class when onPassivate can? Thanks, 



--
This message was sent by Atlassian JIRA
(v6.2#6252)