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

Support defining controller inheritance in XML

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Runtime, XML
    • Environment:

      Alloy1.3.0 Ti3.2.1

    • Story Points:
      13

      Description

      I would like to be able to specify that subTopBar inherits from topBar by defining the baseController relationship in the XML of subTopBar rather than in its JavaScript code.

      — original description follows —

      There is a super controller which name is 'topBar'.
      There is a sub controller which inherit from 'topBar', its name is 'subTopBar'.
      'subTopBar' has no XML in any views, because I wanna reuse the view of 'topBar'.
      (exports.baseController = 'topBar' )

      such as the following .jade file described:

      Alloy
        View
          Require#topBar(src='subTopBar', title='极速开户', top='0')
          View(backgroundColor="#f7f7f7", top="44")
      

      When Alloy building, Alloy will try to find the view of the subcontroller when it was required in XML.

      1st
      I wanna reuse the view, but I cant create a XML in views directory.
      2nd
      I can still create it in JS by dynamic without any XML of subcontroller.

      In a word:
      I am for fear to it is a bug.
      I think it would be better for you to check this issue, thx.

        Attachments

          Activity

            People

            • Assignee:
              skypanther Tim Poulsen
              Reporter:
              mdsb100 曹俊
            • Watchers:
              6 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