- milestone: 2414376 --> v4.4.1
- status: open --> closed
In the following code:
@Entity
@Views({ @View(members = "name, code; " + "manufacturer"),
@View(name = "forReference", members = "name") })
@EntityValidator(value = CodeValidator.class,
properties = {
@PropertyValue(name = "code"),
@PropertyValue(name = "className")
}
)
@Tab(properties = "code, name, manufacturer,className", baseCondition = "record_status = 0")
@Table(name = "b_appliance_model")
public class ApplianceModel extends RecordStatusCodeable {
@Column\(length = 32, name = "manufacturer"\) private String manufacturer; public String getManufacturer\(\) \{ return manufacturer; \} public void setManufacturer\(String manufacturer\) \{ this.manufacturer = manufacturer; \} public String getClassName\(\) \{
System.out.println("*********"+getClass().getSimpleName());// to see whether this method is invoked
return getClass().getSimpleName();
}
}
When I open the url, the table display correctly. And the getClassName() method can be invoked. But when I add a row data, after I click 'save' button, the getClassName() is not invoked.
I also try to declare it as a persistent property. The getClassName() method can be invoked.
It seems calculated properties are not injected in the entity value.