Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-905

Support ability for Renderers to recursively skip over components that establish context when rendering

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.6-core
    • 1.2.6-core
    • Components
    • None

    Description

      Components that solely setup context for their children, logically represent a grouping for their children, or pick a child to render from a group of children cause problems both for Renderers that would like to encode a flattened view of their children, recursively including the leaf children and for components that have strict requirements regarding the types of their children. A good example of the first problem is a UIXPanelFormLayout containing a UIXIterator. The UIXPanelFormLayout would like to lay out the flattened view of the child stamps generated by the UIXIterator, but cannot because it doesn't know anything about UIXIterator. Likewise, it would like to flatten out the children of UIXSwitcher and UIXGroup. Further, it would like this flattening to be recursive--a UIXIterator containing a UIXSwitcher containing a UIXGroup containing a UIXIterator should result in a flattened view of the children.

      The proposed solution is to use the visitor pattern to visit each child in turn in the correct context. The solution is primarily made up of three parts:
      1) The ComponentProcessor interface implemented by the visitor
      2) A FlattenedComponent interface implemented by UIComponents that wish to expose a flattened view of their children in the correct context
      3) UIXComponent static helper functions for performing recursive iteration over mixtures of FlattenedComponents and normal UIComponents. Helpers are provided both for Renderers to call to perform flattened encoding and for FlattenedComponents to call as part of their flattening implementation

      Attachments

        1. Trinidad-905.patch
          32 kB
          Blake Sullivan

        Activity

          People

            Unassigned Unassigned
            btsulliv Blake Sullivan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: