Using setter with Transient VO attribute

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.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

ADF Tips and Tricks

Search

Categories
Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today