Re: Checking in Andy's 180-TreeVisitor API

From: Andy Schwartz <>
Date: Sat, 13 Dec 2008 23:15:34 -0500

Hey All -

Just a heads up - I have uploaded a new patch for 180-TreeVisit that
includes the following changes:

- VisitHint.VISIT_RENDERED has been renamed to SKIP_UNRENDERED
- VisitHInt.VISIT_TRANSIENT has been renamed to SKIP_TRANSIENT
- VisitHint.VISIT_ITERATED has been removed
- VisitHint.EXECUTE_LIFECYCLE has been added
- Restored the UIComponent visitTree() and isVisitable() implementations that
were provided with the original patch.
- Restored the UINamingContainer and UIForm visitTree() implementations that
were provided with the original patch.
- Implemented UIData.visitTree().
- All visitTree() implementations now call
pushComponentToEL()/popupComponentFromEL() and UIComponent.visitTree() javadoc
has been updated to reflect this requirement.
- Added h:dataTable test to jsf-demo/tree-visit
- Added javadoc for VisitContext.createVisitContext() methods

Could someone review these changes (particularly the UIData changes)
and commit if they look good?

BTW, there is still a bit more work to do. In particular:

1. The UIData.visitTree() implementation is not as optimized as it should be.
We currently iterate over all rows. Instead we should take advantage of
VisitContext.getIdsToVisit() to identify exactly which rows need to be visited
and only visit those.

2. Need to add methods to VisitContext to get the full set of ids (not just
NamingContainer-specific ids) and also to retrieve univisited ids.

3. The tree visit demo includes a small sample of <f:ajax> updates within a
table. Currently this does not work as expected due to the fact that <f:ajax>
is not interpreting execute/render ids as relative to the current naming
container. This needs to be fixed (Ajax issue, not tree visit issue).

4. Currently our only test case is the tree visit demo. We need more thorough
tree visit tests.

I'll need to do at least #2 before PFD, but figured I would submit
what I've got now so that we've got more time to review and test these
changes (and also since the UIData.visitTree() implementation may be
useful for testing Ed's state saving changes).