this is what I've tried:
public void setInvoiceStatus(InvoiceStatus value) {
System.out.println("updating invoice status");
if(value != invoiceStatus()) {
System.out.println("updating invoice status date");
this.setInvoiceStatusDate(new NSTimestamp());
}
super.setInvoiceStatusRelationship(value);
}
setInvoiceStatus does get called. Having
super.setInvoiceStatusRelationship(value) causes an infinite loop. If
I remove super.setInvoiceStatusRelationship(value); then relationship
is never updated.
Michael
On Sep 17, 2008, at 11:11 AM, Mike Schrag wrote:
I've tried changing Invoice method from
setInvoiceStatusRelationship(InvoiceStatus value) to
setInvoiceStatus(InvoiceStatus value)
Now setInvoiceStatus in Invoice does get exceuted, however I am not
able to call super.setInvoiceStatusRelationship(value) because they
start calling each other!!
If you're not using Wonder's automatic inverse relationship stuff,
then depending on how you bind this value, it will effect what gets
called. the setXxxRelationship methods add to both sides of
relationship with key. They are not, however, called if you just
bind these values to a form element (like a WOPopUpButton selection
binding). If you want to catch that, you need to override
setInvoiceStatus. You should never call super.setXxxRelationship
from setXxx, though, or you're just asking for infinite loops. You
should be able to override setXxx and call super.setXxx at the end
ONLY and not override the setXxxRelationship method, but it's been a
while since I've had automatic inverse relationship stuff turned
off, so YMMV.
ms
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/michael%40aspireauctions.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]