Hello Mike,

I think I understand... just to make sure:
-I've got a parent component let's call it Parent
-I've got a child component let's call it Child

In Child and Parent, I've got a status variable with its accessors.

Inside Child, in the WOD, I'm calling Parent and bind status(Child) to status(Parent).

My issue isn't a performance one, I need my status in Parent to be updated when I change status in Child (throw an action in child).

Actually when I trigger my action in Child, it changes the status in Child, but then it is set back to the value in Parent (which I though would be updated because of the status = status binding).

How could I make sure the status in Parent is updated according to the status in Child?

Do I have to set the status variables in both Parent and Child?

Thanks

Xavier



syncBindings only applies to the bindings INTO the component as defined in a WOD file that uses it. If you notice in the stack trace:

at com.webobjects.appserver.WOComponent.pushValuesToParent (WOComponent.java:547)

so this is actually bindings pushing back UP from a child component inside. What's happening is that in the WOD file for this component, you are binding "status" into another component, and that component is pushing values back up, which in turn is calling setStatus again. This, however, happens a million times a request and is pretty fast. If setStatus is expensive in your component, then you can do something like:

private int _status;
public void setStatus(int status) {
        if (status != _status) {
                // do stuff
        }
}

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/webobjects% 40anazys.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]

Reply via email to