« Return to Thread: Dwr convert and extends

Re: Dwr convert and extends

by fixfax :: Rate this Message:

Reply to Author | View in Thread

Thanks XMaNIaC for you reply.

I think that it's a good way to reduce the line number in our's dwr configuration.

I'm not sure but you say that Mike is developing or looking this for future versions in  DWR ?

Thanks!

XMaNIaC wrote:
Not currently but I'd also like to see it. Mike has the last work, I guess

On Mon, Apr 28, 2008 at 6:54 PM, fixfax <ignasi.pineiro@gft.com> wrote:

>
> Hi!
>
> i have this class:
>
> public class BaseEntity {
>  private int id;
>  private String name;
> }
>
> and this class:
>
> public class Currency extends BaseEntity {
>  private String code;
> }
>
> When I configure DWR 2.0 I do this:
>
>  <dwr:configuration>
>    <dwr:convert type="bean"
> class="com.db.cib.gm.gfdtracker.entities.BaseEntity">
>      <dwr:include method="id"/>
>      <dwr:include method="name"/>
>    </dwr:convert>
>    <dwr:convert type="bean"
> class="com.db.cib.gm.gfdtracker.entities.Currency">
>      <dwr:include method="id"/>
>      <dwr:include method="name"/>
>      <dwr:include method="code"/>
>    </dwr:convert>
>  </dwr:configuration>
>
> My question is if it's posible when I configure to do something like this:
>
>  <dwr:configuration>
>    <dwr:convert type="bean"
> class="com.db.cib.gm.gfdtracker.entities.BaseEntity">
>      <dwr:include method="id"/>
>      <dwr:include method="name"/>
>    </dwr:convert>
>    <dwr:convert type="bean"
> class="com.db.cib.gm.gfdtracker.entities.Currency">
>      <dwr:include method="code"/>
>    </dwr:convert>
>  </dwr:configuration>
>
> When I put this configuration when i recieve a Currency i don't have id
> and
> name...it's posible to simplify the fist configuration?? and don't need to
> put id and name in Currency convert? maybe is able in DWR to put and
> extends???
>
> Thanks!
>
> --
> View this message in context:
> http://www.nabble.com/Dwr-convert-and-extends-tp16943198p16943198.html
> Sent from the DWR - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@dwr.dev.java.net
> For additional commands, e-mail: users-help@dwr.dev.java.net
>
>

 « Return to Thread: Dwr convert and extends