You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shrinivas Parashar <Sh...@symantec.com> on 2012/07/04 15:58:56 UTC
Type Conversion annotation
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