struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shrinivas Parashar <Shrinivas_Paras...@symantec.com>
Subject Type Conversion annotation
Date Wed, 04 Jul 2012 13:58:56 GMT
Hi,

Can we define @TypeConversion annotation of the nested property at the parent level.

For Example I have a bean

public class Bike {

    private Name name;

    public Name getName() {

       return this.name;

    }



    public void setName(Name name) {

        this.name = name;

    }

}



I would like to specify the @TypeConversion annotation for Name property in the model like
below



@Conversion

public class Person

{

    Bike bike;



    @TypeConversion(key = "bike.name", converter = "org.apache.struts.helloworld.model.MyConverter")

    public Bike getBike() {

        return this.bike;

    }

    public void setBike(Bike bike) {

        this.bike = bike;

    }

}

Is this possible?



Regards,
Shrinivas
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message