Wrapping controls into hboxes or other containers requires setting dataContainer explicitly

Is it intentional that when you wrap some controls into an hbox or other container, you then have to set their dataContainer properties explicitly? (Or am I missing another reason things don’t work before I do that?)

I wrapped some controls into an hbox, went in to test the screen, and said fields were blank even though the data was there in the DB. To troubleshoot, I tried setting the dataContainer of these fields, and voila, it all then worked as expected. When controls are added to a screen, this property is blank but everything works fine… once wrapped into a container of some sort, they no longer work.


I suppose that you’re talking about the Form component, if so then it’s intended behavior. When you wrap components into hbox/vbox/etc. It means that you provide a custom layout and it’s hard to infer what field is supposed to present an entity attribute, so it’s completely up to you.


Hmm, I still feel like it should inherit the dc up the nesting hierarchy.

Just putting a, for example, textField onto a screen using the designer, you have:

layout -> form -> column -> textField

That textField doesn’t need its dataContainer set; it inherits it up the tree.

But say you wrap 2 textFields in an hbox, then you have:

layout -> form -> column -> hbox -> textField textField

I still feel like the dc should be inferrred from up the tree.

It’s no big deal to set it manually; it just doesn’t seem like that one additional nesting layer should halt the inheritance of the dc.