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: Ken Anderson <email@hidden>
- Date: Tue, 6 Nov 2007 13:53:03 -0500
If the checkboxes are the only things on the form, it's possible
you're running into the dreaded "nothing on the form so no post"
issue. You could also be running into another common issue, where
the state of your component is not staying the same throughout the
request/response loop. Sorry I don't have time to go into it further
right now...
Ken
On Nov 6, 2007, at 12:29 AM, Kevin Windham wrote:
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:
40anderhome.com
This email sent to email@hidden
_______________________________________________
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