Scenario:
Standard VO has some transient attributes which gets
populated by overriding the getter methods in the VORowmpl. When we extend this
VO for adding some additional attributes, everything works except the original
transient attributes. Those attributes are coming as null.
The reason is, when the extended VORowImpl is getting
generated by the Jdeveloper, it will not call the super method (which is
already overridden). So you need to modify the getter method of the Transient
attribute in the extended VO to call the getter method in the Standard VO
using super.
Standard VORowImpl getter method will be something as shown below.
public String
getAttribute1() {
return "Calculated Value";
}
Generated getter method in the extended VORowImpl as shown below.
public
String getAttribute1() {
return (String) getAttributeInternal("Attribute1");
}
Solution:
To fix this, modify the getter method of the extended VORowImpl as shown below.
public String
getAttribute1() {
//return
(String) getAttributeInternal("Attribute1");
return super.getAttribute1();
}
No comments:
Post a Comment