Resource attributes in constructor

Scott Jewell writes:
 > Hi,
 > 
 > Hope this is an easy one for somebody out there.
 > 
 > I can't seem to access my resources attributes in the constructor for
 > the class.  When I do a getValue, nothing is returned?  I'm not getting
 > an IllegalAttributeException or anything, just no value.  When the same
 > call is placed in the get() method, the proper value is returned.
 > 
 > Any ideas on what I'm missing?

You can use attribute (get/set) until the resource has been
initialized. To hook on that initialize, you need to put the code you
have in the contructor into the initialize method:

public void initialize(Object values[]) {
super.initialize(values);
// Your code here, can access attributes
...
}

Anselm.

Received on Friday, 24 January 1997 02:42:19 UTC