Tapestry
  1. Tapestry
  2. TAPESTRY-1430

Add searchIds parameter to Shell component (passthrough to djConfig)

    Details

      Description

      The djConfig parameter "searchIds" provides a way to have Dojo automatically parse a known set of page widgets without enabling full automatic parsing (slow for performance reasons).

      When an application has a component defined around the Shell component to provide common functionality (navigation, etc) and look-and-feel consistency across pages in an application, it would be nice to be able to specify a fixed list of client IDs for Dojo to parse for widgets rather than needing to instantiate them individually via JavaScript in the component.

      For example, I just tested a page where our menu widgets (a TreeV3 and related controllers and selectors) are all defined inside a wrapper DIV with an ID of "menuControls". Adding this DIV ID to djConfig.searchIds allowed the menu to be parsed from the markup without needing to traverse the entire page or manually configure all the widgets involved in a tree via JavaScript.

      This is especially useful when a hybrid tree instantiation fails because of a bug in Dojo - creating a TreeV3 widget via JavaScript from an existing DOM node with child nodes specifying tree node dojoType values fails because the tree widget domNode hasn't been appended to the document yet at the time the child nodes try to register.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Andreas Andreou
            Reporter:
            Greg Woolsey
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development