Mapping Properties from Nested Polymer Templates

Hi!

I am trying to create a basic CRUD view using polymer templates, with a list and then a detail panel.

I was thinking that I could create a top-level template then include the “list” and “detail” panel .js files inside the design.
However, when I do this, my @Id tags no longer find a corresponding element.

e.g
list.js includes a “list” element.
detail.js includes a “name” and “email” element.

In the Java file, I want to map list, name and email to Java components. It works if I use list.js or detail.js as the root @JsModule, but not when I use a parent file to combine them together.

Is there a trick to getting the @Id tags to map when you compose a screen using several .js files? Or is this not possible?

Thanks!
~Ben

If I understand correctly, you should be able to create Java companion files for your list and detail components, use @Id binding in them, and then use @Id binding for the corresponding <custom-list> and <custom-detail> web components in your main template.

Oh! So a companion file for each .js.

That makes sense.
Let me try that.