myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Robinson (JIRA)" <...@myfaces.apache.org>
Subject [jira] Created: (TRINIDAD-1998) Allow a VisitCallback to visit the children of a target using a new visit context
Date Wed, 05 Jan 2011 23:22:45 GMT
Allow a VisitCallback to visit the children of a target using a new visit context
---------------------------------------------------------------------------------

                 Key: TRINIDAD-1998
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1998
             Project: MyFaces Trinidad
          Issue Type: Improvement
          Components: Components
    Affects Versions: 2.0.0.3-core
            Reporter: Andrew Robinson
            Assignee: Andrew Robinson


Currently UIXComponent provides hooks for a component to know when the children are being
visited by calling setupChildrenEncodingContext or setupChildrenVisitingContext on the component.
The problem is that setupChildrenVisitingContext is protected and cannot be called from the
outside. 

A use case where this is very helpful is when you want to locate one component using the visitTree
API and then visit all the children under that component. Currently there is no means to be
able to do this with correctly having the correct setup and tear down methods called on the
UIXComponent. 

A static method on UIXComponent would be helpful to allow one to visit the children of a component
using a new visit call from within an outer call. 

Example:

@Override
public VisitResult visit(
  VisitContext visitContext,
  UIComponent  target)
{
  if (someCondition)
  {
    UIXComponent.visitChildren(target, visitContext, new VisitCallback() {...});
    return VisitResult.COMPLETE;
  }
  ...
}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message