Gang -

Back in June of last year on the jsr-314-open mailing list, there was
discussion on the need for a tree visit hint to indicate that
iterating components (like UIData) should not iterate during the
visit.  At that point it was too late to add a new VisitHint enum
value to the 2.0.x specification.  As a short-term workaround, we
agreed to a compromise: we'll use a "javax.faces.visit.SKIP_ITERATION"
FacesContext property as a temporary substitute for the real
VisitHint.  (The real visit hint has been added in 2.1.)

For more info, see the following jsr-314-open thread:

http://lists.jboss.org/pipermail/jsr-314-open-mirror/2010-June/000200.html

This interim solution was implemented in Mojarra 2.0.x - though looks
like it has not made it into MyFaces yet.  I am planning to open up an
issue to request that we add this, but figured it wouldn't hurt to
ping the dev list to see whether anyone has comments/questions on this
topic.

BTW, the main reason I would like to see this hint get in is because I
need the ability to perform a skip iteration visit for my own purposes
(have a use case in ADF Faces where I need to do this).  However, I
noticed that this would also be beneficial for one use case in MyFaces
as well: PostRestoreStateEvent delivery.

Currently, PostRestoreStateEvents are delivered using a full tree
visit.  Without SKIP_ITERATION support, we end up delivering multiple
(redundant) events for components that are nested within iterating
ancestors.  One negative side effect of this: since the  "binding"
attribute resolution has been moved to UIComponent.processEvent() in
2.0, this means that in cases like this:

  <h:dataTable value="#{someModel}" var="row">
    <h:column>
      <h:ouputText binding="bean.foo"/>
    </h:column>
  </h:dataTable>

The binding setter (eg. setFoo()) is called once per-row (in 2.0)
instead of one time per request (in 2.1).  This change in behavior
between 1.2/2.0 seems like a bug that could be easily fixed with
SKIP_ITERATION visiting support.

Okay - will open an issue or two on this soon.  Interested to hear
whether anyone has thoughts on this.

Andy

Reply via email to