Thanks Todd, that answers my question nicely :-)

On Thu, 20 Aug 2009 01:57:13 pm Todd Volkert wrote:
> Yes, that's right.  Container propagates the load/store to its children.
>  Further, you can set a contextKey on a Container if your data binding
> context has nested dictionaries.  For instance, imagine you have the
> following UI:
> <Form wtkx:id="form">
>     <sections>
>         <Form.Section>
>             <TextInput Form.label="Company" textKey="company" />
>             <BoxPane Form.label="Name" styles="{spacing:5}">
>                 <TextInput textKey="first_name" />
>                 <TextInput textKey="last_name" />
>             </BoxPane>
>         </Form.Section>
>     </sections>
> </Form>
>
> Now I can call form.store(context), and context will be populated as
> follows (in JSON notation):
>
> {
>     company: "...",
>     first_name: "...",
>     last_name: "..."
> }
>
> But if my use case calls for nested dictionaries, I can change the UI to
> be:
>
> <Form wtkx:id="form">
>     <sections>
>         <Form.Section>
>             <TextInput Form.label="Company" textKey="company" />
>             <BoxPane Form.label="Name" contextKey="name"
> styles="{spacing:5}">
>                 <TextInput textKey="first" />
>                 <TextInput textKey="last" />
>             </BoxPane>
>         </Form.Section>
>     </sections>
> </Form>
>
> And now if I call store(context), then context will contain the following:
>
> {
>     company: "...",
>     name: {
>         first: "...",
>         last: "..."
>     }
> }
>
> -T
>
> On Wed, Aug 19, 2009 at 5:25 PM, Scott Lanham <[email protected]> wrote:
> > Hi,
> >
> > Just to make sure I have this right; if I call load or store on a
> > component then load/store will automatically be called on the components
> > children?
> >
> > Thanks,
> >
> > Scott.

Reply via email to