Setting selected object in parent component
Setting selected object in parent component
- Subject: Setting selected object in parent component
- From: Leif Harrison <email@hidden>
- Date: Wed, 13 May 2009 11:48:16 -0700
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@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