Support ability for Renderers to recursively skip over components that
establish context when rendering
-------------------------------------------------------------------------------------------------------
Key: TRINIDAD-905
URL: https://issues.apache.org/jira/browse/TRINIDAD-905
Project: MyFaces Trinidad
Issue Type: New Feature
Components: Components
Affects Versions: 1.2.6-core
Reporter: Blake Sullivan
Fix For: 1.2.6-core
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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.