I added a property (using the BeanInfo Editor) of the same type as my bean, and the bean hangs when I use it in Visual Composition. Why?
Created May 4, 2012
Scott Stanchfield
When you add any properties that are of an Object type, VAJ creates a variable definition like
private fieldUncle = new Monkey();
The problem with this is that it goes in a class like
public class Monkey { private fieldUncle = new Monkey(); public Monkey getUncle() {return fieldUncle;} public void setUncle(Monkey newUncle) { fieldUncle = newUncle; } }
which is a tad problematic.
The solution is to simply remove the "new Monkey()" from the variable definition, leaving
public class Monkey { private fieldMonkey; public Monkey getUncle() {return fieldUncle;} public void setUncle(Monkey newUncle) { fieldUncle = newUncle; } }