By Abhishek Dwivedi on Apr 15, 2013
I was invoking setAttribute("MyTransientAttributeName", MyTransientAttributeValue) in AMImpl. Later, I was accessing MyTransientAttributeName inside the expression of another transient attribute. But I was not getting expected result. On investigation, I found that the value of MyTransientAttributeName was coming out to be null.
But why? I was setting the same in AMImpl. To verify if the setter was setting the value correctly, I printed getAttribute("MyTransientAttributeName") and it gave back the expected MyTransientAttributeValue.
Where was the problem then?
The problem lied in the fact that this transient attribute was not there in the EO on which this VO was based. That's not a problem otherwise. But if setter is to be used, you should make sure that your transient attribute is there in the EO.