• 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: Noticing changes to a WOTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Noticing changes to a WOTextField


  • Subject: Re: Noticing changes to a WOTextField
  • From: Kieran Kelleher <email@hidden>
  • Date: Tue, 24 Apr 2007 17:53:41 -0400

Of course I am assuming the textfields are EO attributes ..... if not, override takeValuesFromRequest in the child component, save all the textfield values somewhere (like a dictionary in the parent accessible via a binding in the child component) and call super on takeValues and afterward, compare current textfield values to the ones you temporarily saved and if different (changed) call performParentAction or set a boolean (doExpensiveOperation) in the parent thru a binding to trigger the expensive operation or grab the parent reference (parent()) and call the method or whatever

On Apr 24, 2007, at 5:36 PM, Kieran Kelleher wrote:

This returns a dictionary where the keys are the changed values and the values are the new values, so you could check for presence of certain keys. This is straight from Projecter WOnder's ERXGenericRecord.

/* (non-Javadoc)
* @see er.extensions.ERXEnterpriseObject#changesFromCommittedSnapshot()
*/
public NSDictionary changesFromCommittedSnapshot() {
return changesFromSnapshot(editingContext ().committedSnapshotForObject(this));
}




On Apr 24, 2007, at 3:45 PM, Serethos wrote:

I have a component embedded within another component (it is included in the wod-descriton file)
which gets displayed as a webpage.
The embedded one represents a Form with a set of WOTextFields. When the submit-button is
activated, the outer component needs to know if something in the textfields has changed, so
that it can trigger an cost expensive event or avoid it if nothing changed.
What is the smartest way to check for that condition?

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.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: 
 >Re: Noticing changes to a WOTextField (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: Re: Noticing changes to a WOTextField
  • Next by Date: I'm killing my database
  • Previous by thread: Re: Noticing changes to a WOTextField
  • Next by thread: I'm killing my database
  • Index(es):
    • Date
    • Thread