I was trying something out today and discovered something that doesn’t seem to be working right, or maybe it is and I am doing it wrong.
I have a handler, and two model objects. Nothing out of the ordinary, one model object is a singleton and the other is a transient.
When do something like this in my handler, I am getting strange results.
property name=“myTest” inject
inside the handler I am also doing this.
myTest2 = getModel(“myTest1”);
myTest3 = getModel(“myTest1”);
What seems to be happening is that the singleton is being ignored, for example if I then do this
myTest2.setValue(100);
myTest3.setValue(200);
I find that the second instantiated model is actually a copy of the first, am I right to expect that both myTest2 and myTest3 are actual transients rather than singletons?
Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: http://plus.google.com/113032480415921517411