Re: Question about EOs and their lifespan/uniqueness
Re: Question about EOs and their lifespan/uniqueness
- Subject: Re: Question about EOs and their lifespan/uniqueness
- From: Kevin Windham <email@hidden>
- Date: Mon, 5 Nov 2007 23:29:40 -0600
On Nov 5, 2007, at 2:26 PM, Mike Schrag wrote:
If you're not refetching it and literally holding onto the same EO
instance in your component, you're doing something wrong, because
that works. If you're setting a var on an EO and then refetching
it, that will not work -- you get a new EO. I would add a print
out in your boolean's set method to see if someone is inadvertently
setting it to false and i woudl print out System.identityHashCode
(yourEO). If it's the same instance, that will be the same. If
it's a different instance (which is probably what is happening) it
will not match.
ms
Well, I used your handy tip about the hash code and I've discovered
that they are the same objects being worked with on both pages. The
odd thing is that the only time it calls the function to set the
value of the checkbox is if the checkbox was checked to start with.
Only it sets it to false. So if I start with all false values for my
checkboxes, no set methods are called on the EO. If I start with a
true value the set method is called, but it sets to false. I find
this to be very perplexing...
Doh! I just figured out what was causing all the confusion. It was
the name binding. I had bound the checkbox names to a function that
named the boxes sequentially for a javascript I was using. It appears
that using the name binding on a checkbox breaks it. Any ideas how to
work around this name binding issue?
Kevin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden