Re: Type conversion with Generics

2008-01-09 Thread ravi_eze
hey! one thing btw: when u say something[0] how can it be represented in set/ map as the order is not maintained? and one more thing: *-conversion.prop does it work for a custom object in the action class (struts2) (i.e. i had seen fromString being called but not toString method ) any help r

Re: Type conversion with Generics

2008-01-09 Thread Dave Newton
--- jvleminc <[EMAIL PROTECTED]> wrote: > Just noticed that this partial solution only started working after I had > changed the Set of EoActivities into a List of EoActivities; this while the > internal ones are still Sets. Seems the *-conversion.properties for only > works for Lists... That was

Re: Type conversion with Generics

2008-01-09 Thread jvleminc
Just noticed that this partial solution only started working after I had changed the Set of EoActivities into a List of EoActivities; this while the internal ones are still Sets. Seems the *-conversion.properties for only works for Lists... jvleminc wrote: > > I have already found out that by u

Re: Type conversion with Generics

2008-01-08 Thread jvleminc
Btw, Martin Gainty wrote me this by email: Rick's suggestions are very helpful.. 2 things would need to know 1)How will the data be represented visually.. starting with a working example you can use Checkbox as illustrated http://struts.apache.org/2.x/docs/checkbox-interceptor.html public class

Re: Type conversion with Generics

2008-01-08 Thread jvleminc
Thanks for all answers so far. I know I can wrap them in other, simpler objects; but before doing so (and having to retouch my Javascript layer that lies on top of it :-( ), I wanted to find out if there is a way to have Struts2 do this automatically for me... I have already found out that by us

Re: Type conversion with Generics

2008-01-08 Thread Rick Reumann
Yup Maps will work also. On Jan 8, 2008 1:57 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > I've never used Sets, only Maps, which definitely work... > > As a sanity check perhaps you could try using a Map. I know you can get a > Set > view of a Map, so perhaps this is an alternative solution (I'm

Re: Type conversion with Generics

2008-01-08 Thread Dave Newton
I've never used Sets, only Maps, which definitely work... As a sanity check perhaps you could try using a Map. I know you can get a Set view of a Map, so perhaps this is an alternative solution (I'm not so sure about going the other direction, however). This would at least narrow down the problem

Re: Type conversion with Generics

2008-01-08 Thread Rick Reumann
I'm assuming you can't change them because someone else created them? There are still ways you can deal with the beans with sets.. 1) Wrap them using the Adapter pattern. However if they are already coming back nested and you can used the adapters/wrappers in the business layer you could also.. 2)

Re: Type conversion with Generics

2008-01-08 Thread jvleminc
I know. Unfortunately i can't change my business beans anymore :-( Anyway, any other ideas? I am trying now with a EoActivities-conversion.properties file, containing Element_eoActivity = com.datamat.care.bean.EoActivity Element_eoUser = com.datamat.care.bean.EoUser Element_eoUserAddress = com.da

Re: Type conversion with Generics

2008-01-08 Thread Rick Reumann
At least in Struts1.1, If I'm not mistaken, you aren't going to be able to use indexed properties like you are to set items in a Set. If you use Lists it would be much easier to accomplish the nested collection population. On Jan 8, 2008 1:02 PM, jvleminc <[EMAIL PROTECTED]> wrote: > > Hello, > >