Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-775

Allow a Require to add both (multiple) Templates and ListSections

    Details

      Description

      The goal

      index.xml

      <Alloy>
          <Window>
              <ListView>
                  <Require src="foo" />
              </ListView>
          </Window>
      </Alloy>
      

      foo.xml

      <Alloy>
          <Templates>
              <ItemTemplate name="tpl">
                  <Label bindId="label" />
              </ItemTemplate>
          </Templates>
          <ListSection>
              <ListItem template="tpl" label:text="Hello World" />
          </ListSection>
      </Alloy>
      

      Current situation

      If the <Templates> come first, nothing is added to the index-controller. If the <ListSection> comes first, the index-controller will act like the foo is only providing a ListSection. In the foo-controller it tries to do both but cannot handle the <Templates> tag.

      Proposed solution

      For all situations in which <Require> is used under a <ListView>, we should pass both the object holding the templates (__itemTemplate) and the array (which would then need to become an object as well) holding the sections. This way, the required controller can add multiple ListSections (TC-2692) and/or Templates.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              fokkezb Fokke Zandbergen
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration