logo       

Re: Transferring bean with embedded bean filled by selection list: msg#00193

java.dwr.user

Subject: Re: Transferring bean with embedded bean filled by selection list

Have you seen this example?
http://getahead.ltd.uk/dwr/examples/form

Yes, I see ...

But this example shows only one bean (Person) without embedded Status and selection list for it's values.

<skip>

I tried to read http://getahead.ltd.uk/dwr/examples, but I see only DWRUtil.setValues and DWRUtil.addOptions which can't be used in this use case. It is possible to implement this with handwritten JavaScript code, but I hope there is a more simple and right way. Can anybody help me to find it?

Sorry, advanced DWRUtil.addOptions form (DWRUtil.addOptions(selectid, array, valueprop, textprop)) is suitable for my case.

But DWRUtil.setValues is not suitable because it fetches option value to result object instead of creating subobject. I can modify Person definition to replace Status member with long statusId, but this approach will break ORM semantics on server side. It will be difficult to use this approach with Hibernate, for example. What is the right way to resolve this problem?

Thanks in advance,
Eugene Prokopiev


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise