Nice--

so you would have

public void accept(new ComponentVisitor(FacesContext faces, UIComponent c) {
   c.renderAll(faces);
});

public class IndexedPerspective {
   private final idx;
   private final UIData parent;
   private final UIComponent target;

   public void visit(ComponentVisitor cv) {
      int oidx = parent.getRow();
      try {
         parent.setRow(idx);
         cv.accept(target);
      } finally {
         parent.setRow(oidx);
      }
   }
}

?

Martin Marinschek wrote:

Hi *,

I've decided against Jacob's suggestion of using Avatar and
Perspectives for solving my executeOn... - problem. I believe that it
is important to have the actual component instance available, and this
is better doable with a callback-method that is called from the
blackbox the parent component represents.

for the executeOnComponent stuff I'm currently working on I'd need to
have a way to inversely lookup components. I want to provide an id -->
find component

For children of an UIData component I have problems with that: the
id's of those components include the NamingContainer.SEPARATOR_CHAR
for both separating the naming-containers from each other and for
separating the row-index from the id of the component.

Shouldn't there be different characters used for those two usages - or
another way of clearly distinguishing these separators (e.g. a
doble-colon for the row-index)?

Plus - Ed, I've just read in the spec that you've added a section
explaining that there are problems with the id as a separator for
id-based selectors in the explanation of NamingContainers. We've just
recently had a discussion on the mailing-list where on of our users
has told me that it is possible to escape the colon in id-selectors
with a \. you might want to add this to the workarounds you present in
the spec.

regards,

Martin

--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



--
Jacob Hookom  -  Minneapolis
----------------------------
JSF-EG, JSF-RI, EL, Facelets

Reply via email to