Since 3.3.0P04 and 4.1
PanelStack is a controller container which contains children of markup. A user would only see the single stackPane and its children of the stackPane that is the currently selectedId attribute for the panelStack component.
The stackPane manages its children by using a component tag handler which reads the attributes client and facelet and determines if the stackPane's children are added to the server-side component tree(SSCT). Rather than users having to use jstl tags like or to try to reduce the size of the SSCT, this tag can be quite easily used and the stackPanes can be:-
1. client="true", meaning children of the stackPane are always in the SSCT and always rendered and good for static content. The DOMDIff algorithm will keep updates small since nothing changes anyways. Although the children of the stackPane are always rendered, they are only visible if the stackPane is the selectedId (otherwise, they are hidden). This might be of use if a control is modifying the stackPane and bandwidth is limited. The Domdiff will ensure the response size is small, and the selectedId of the panelStack can change rather quickly with little to no page update occupying bandwidth (for example mobile apps).
2. client="false", facelet="false". This is standard JSF behavior. All children of this stackPane are in the server-side component tree but only the children of the selected stackPane are rendered.
3. client="false", facelet="true". A pruned component tree will result in this case. The stackPane that has this combination will only include its children in the SSCT if it has the id which matches the panelStacks selectedId attribute. Note that the client attribute defaults to false.
To understand this feature, in the above example, pane1 could have 1 child (just some text), pane2 could have 5 children and pane3 could have 30 children (perhaps a dataTable and the number of components that are state saved with it which could be quite a bit larger than 30!). Anyways, with this example, you reduce the size of the SSCT for each user/session by the amount of children placed in a facelet="true" situation like pane3 quite simply. The stackPane itself will always be part of the component tree, it is just the children that are either added or not, depending on the facelet attribute (as long as client is not true).
© Copyright 2018 ICEsoft Technologies Canada Corp.