• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Question about EOs and their lifespan/uniqueness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Question about EOs and their lifespan/uniqueness (From: Kevin Windham <email@hidden>)
 >Re: Question about EOs and their lifespan/uniqueness (From: Mike Schrag <email@hidden>)
 >Re: Question about EOs and their lifespan/uniqueness (From: Kevin Windham <email@hidden>)

  • Prev by Date: Re: EODatabaseContext locking situation
  • Next by Date: clarification on single-bundle WOA deployment
  • Previous by thread: Re: Question about EOs and their lifespan/uniqueness
  • Next by thread: Error associating with inserting a new record into the table in SQL Server 2005 database when its primary key's IDENTITY SPECIFICATION is YES
  • Index(es):
    • Date
    • Thread