You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jun Tsai <ju...@gmail.com> on 2010/01/11 04:44:26 UTC
page generic problem
hi,all
I had meet some problem about generic type
PageA<T>{
public T getEntity(){
}
public T setEntity(T entity){
}
.....
}
PageB extends PageA<Member>{
.....
}
When I access ${entity.name} in tml ,PageB works fine.Then I create PageC
PageC extends PageB{
....
}
When I access ${entity.name} in tml of PageC,Exception was thrown:
Class java.lang.Object does not contain a property named 'name' (within
property expression 'entity.name). Available properties: class.
-
org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.infoForPropertyNode(PropertyConduitSourceImpl.java:942)
-
org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.infoForPropertyOrMethod(PropertyConduitSourceImpl.java:932)
-
org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createGetterAndSetter(PropertyConduitSourceImpl.java:421)
-
org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createAccessors(PropertyConduitSourceImpl.java:407)
-
org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createInstance(PropertyConduitSourceImpl.java:260)
What's wrong with it? thanks.
--
regards,
Jun Tsai
Re: page generic problem
Posted by Jun Tsai <ju...@gmail.com>.
2010/1/13 Thiago H. de Paula Figueiredo <th...@gmail.com>
> On Wed, 13 Jan 2010 10:14:00 -0200, Jun Tsai <ju...@gmail.com> wrote:
>
> Two levels works fine.but three levels doesn't work.
>>
>
> This looks like a bug or improvement. What about a JIRA about it?
>
>
>
https://issues.apache.org/jira/browse/TAP5-982
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
regards,
Jun Tsai
Re: page generic problem
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Wed, 13 Jan 2010 10:14:00 -0200, Jun Tsai <ju...@gmail.com> wrote:
> Two levels works fine.but three levels doesn't work.
This looks like a bug or improvement. What about a JIRA about it?
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da
Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: page generic problem
Posted by Jun Tsai <ju...@gmail.com>.
2010/1/13 Thiago H. de Paula Figueiredo <th...@gmail.com>
> On Wed, 13 Jan 2010 01:13:29 -0200, DH <ni...@gmail.com> wrote:
>
> I think T5 doens't support generic well in page class, I got some
>> unexpected exceptions too.
>>
>
> I use generic superclasses a lot without problems. In this case, a generic
> interface is used. Maybe that's the source of the problem. Another one is
> that the hierarchy has three levels (PageA -> PageB -> PageC). I use two
> levels.
>
>
Two levels works fine.but three levels doesn't work.
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
regards,
Jun Tsai
Re: page generic problem
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Wed, 13 Jan 2010 01:13:29 -0200, DH <ni...@gmail.com> wrote:
> I think T5 doens't support generic well in page class, I got some
> unexpected exceptions too.
I use generic superclasses a lot without problems. In this case, a generic
interface is used. Maybe that's the source of the problem. Another one is
that the hierarchy has three levels (PageA -> PageB -> PageC). I use two
levels.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da
Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: page generic problem
Posted by DH <ni...@gmail.com>.
I think T5 doens't support generic well in page class, I got some unexpected exceptions too.
DH
----- Original Message -----
From: "Jun Tsai" <ju...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Monday, January 11, 2010 11:44 AM
Subject: page generic problem
> hi,all
> I had meet some problem about generic type
> PageA<T>{
> public T getEntity(){
> }
> public T setEntity(T entity){
> }
>
> .....
> }
> PageB extends PageA<Member>{
> .....
> }
> When I access ${entity.name} in tml ,PageB works fine.Then I create PageC
>
> PageC extends PageB{
> ....
> }
>
> When I access ${entity.name} in tml of PageC,Exception was thrown:
> Class java.lang.Object does not contain a property named 'name' (within
> property expression 'entity.name). Available properties: class.
>
> -
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.infoForPropertyNode(PropertyConduitSourceImpl.java:942)
> -
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.infoForPropertyOrMethod(PropertyConduitSourceImpl.java:932)
> -
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createGetterAndSetter(PropertyConduitSourceImpl.java:421)
> -
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createAccessors(PropertyConduitSourceImpl.java:407)
> -
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createInstance(PropertyConduitSourceImpl.java:260)
>
>
> What's wrong with it? thanks.
> --
> regards,
> Jun Tsai
>