Well, in this case all of my components have synchronizeVariablesWithBindings as (presumably) true, since they're just subclasses of ERXComponent (and I don't override the method myself).

And it looks like in the selectedObject1 case, everything still works just fine if I comment out the parent.setValueForBinding call.

However, still no idea why the selectedObject2 case does not appear to be updating the binding in the parent component. :(

Maybe because I'm using Ajax actions (AjaxSubmitButton) for everything?

        - Leif

On May 13, 2009, at 11:56 AM, Ricardo J. Parada wrote:

If your component's synchronizeVariableWithBindings(0 returns false then the component should use setValueForBinding() to set the value in the parent component.



On May 13, 2009, at 2:48 PM, Leif Harrison wrote:

Hey guys (and gals),

I'm trying to figure out how to propagate an object selection from a child component up to it's parent (and down to another child component, but that should just be a simple binding).

My component hierarchy (a bit simplified) looks like this:
<ParentComponent>
        <Component1>
                <AjaxUpdateContainer>
                        Object1 list  <= has an action to select an Object1
                </AjaxUpdateContainer>
        </Component1>
        <Component2 selectedObject1="selectedObject1">
                <AjaxUpdateContainer>
                        selectedObject1 detail
                        Object2 list   <= has an action to select an Object2
                </AjaxUpdateContainer>
        </Component2>
        <AjaxUpdateContainer>
                <wo:if selectedObject2>
                        <Component3 selectedObject2="selectedObject2">
                                <AjaxUpdateContainer>
                                        selectedObject2 detail
                                </AjaxUpdateContainer>
                        <Component3>
                </wo:if>
        </AjaxUpdateContainer>
</ParentComponent >

Now, somehow I got the selection and detail display of Object1 working just fine. But...now that I'm trying to get the selection/ detail display of Object2 working, I can't seem to get it to work right.

All of the components involved are currently just using simple public variable bindings (yeah, I know, I should be using accessors for better encapsulation...), with the "selection" methods in Component1 and Component2 using parent.setValueForBinding to set the selected object in the parent component.

Is it just a fluke that the selection of Object1 is working? Should I be using non-synchronized bindings for my parent component? Or is there something else I'm missing (or a better way to do this)?

        - Leif

----------
Leif Harrison
[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/rparada%40mac.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