Howard,

Thank you for the quick response!  Are there intentions to get Tapestry to
support generics for cases like this when its released?  It would really be
great to have this kind of support (I've already come across a few cases
where it would come in very handy).

Thanks again,
B



Howard Lewis Ship wrote:
> 
> Tapestry only understands simple generics applied directly to your
> page or component class.
> 
> On Thu, Mar 6, 2008 at 4:59 PM, buckofive <[EMAIL PROTECTED]> wrote:
>>
>>
>>  Hi all,
>>
>>  I'm wondering if this is even possible.   I read that java 1.5 generics
>>  support was as added as of tapestry 5.0.10 but I am unable to get it to
>>  work.  I always end up with this exception:
>>  "Class java.lang.Object does not contain a property named 'id' (within
>>  property expression 'genericsTest.instance.id').  Available properties:
>>  class."
>>
>>  I have tried this with 5.0.10 and 5.0.11-SNAPSHOT.  I would greatly
>>  appreciate any help, I'm sure its something silly that I'm missing.
>>
>>  Thank you in advance!
>>
>>
>>  Here is the code I am using:
>>
>>  public class Start
>>  {
>>         private Generic<Test> genericsTest = new Generic<Test>(new
>> Test(555));
>>         public Generic<Test> getGenericsTest() {return genericsTest;}
>>         public void setGenericsTest(Generic<Test> test)
>> {this.genericsTest=test;}
>>  }
>>
>>
>>  public class Generic<T> {
>>         T instance;
>>
>>         public Generic(T instance)
>>         {
>>                 this.instance=instance;
>>         }
>>
>>         public T getInstance() {return instance;}
>>         public void setInstance(T instance) {this.instance = instance;}
>>  }
>>
>>
>>  public class Test
>>  {
>>         int id;
>>         public Test(int id)
>>         {
>>                 this.id = id;
>>         }
>>         public int getId() {return id;}
>>         public void setId(int id) {this.id = id;}
>>  }
>>
>>  Start.tml:
>>
>>          Java 1.5 Generics Test: ${genericsTest.instance.id}
>>
>>
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/-T5--Help-getting-generics-to-work-tp15885528p15885528.html
>>
>>
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator Apache Tapestry and Apache HiveMind
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--Help-getting-generics-to-work-tp15885528p15909013.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to