Many thanks for your reply Sven.

However, I think that I didn't explain the problem properly.

If my, much simplified, java class is like this :-
<pre>

public class comp {

   //note getters/setters/annotations not shown

   private B valueItem;

   private List<B> items = new ArrayList<B>();

   public List<B> getSourceList(){
         B item1 = new B();
         item1.setEmail("[EMAIL PROTECTED]");
         item1.setName("Peter");
         List<B> sourceList = new ArrayList<B>();
         sourceList.add(item1);
         return sourceList;
   }
}

and a comp.tml including :-

               <tr t:type="loop" source="sourceList" value="valueItem">
                   <td>
                       <t:checkbox t:id="..." value="selected"/>
                   </td>
               </tr>

and use a setSelected(...) method  (not shown) to copy a ticked
valueItem to the items list,
then

   in the case of (1)

public class B {
   private String name;
   private String email;
   ...
}

All is fine.


However, if we have the case of (2)


public class A {
   private String name;
   ...
}

public class B extends A {
   private String email;
   ...
}
</pre>

then the objects in the items list have email correctly set and name ==
null, where both should have been set.

I am using t5.0.13 and java6.

Any pointers/thoughts much appreciated.

Regards,

Peter



Sven Homburg wrote:
the OGNL binding should help you
http://code.google.com/p/tapestry5-components/
http://87.193.218.134:8080/t5components/t5c-commons/howto_ognlbinding.html

2008/6/30 Peter Courcoux <[EMAIL PROTECTED]>:

Hi all,

When the loop component sets the value from the iterator, it seems to miss
properties inherited from a base class.

So if I'm iterating over a set of objects of class B which extends A, I'm
only seeing the properties of B set. All the properties which are inherited
from A are null.

Am I missing something?

Any pointers much appreciated.

Thanks,

Peter

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







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

Reply via email to