myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] Created: (MYFACES-2670) Components on facets are not removed programatically by PSS algorithm
Date Fri, 23 Apr 2010 20:14:50 GMT
Components on facets are not removed programatically by PSS algorithm 
----------------------------------------------------------------------

                 Key: MYFACES-2670
                 URL: https://issues.apache.org/jira/browse/MYFACES-2670
             Project: MyFaces Core
          Issue Type: Bug
          Components: JSR-314
    Affects Versions: 2.0.0
            Reporter: Leonardo Uribe
            Assignee: Leonardo Uribe


We have the following algorithm to remove components programatically on PSS:

                List<String> clientIdsRemoved = getClientIdsRemoved(view);
                
                if (clientIdsRemoved != null)
                {
                    for (String clientId : clientIdsRemoved)
                    {
                        view.invokeOnComponent(context, clientId, new ContextCallback()
                            {
                                public void invokeContextCallback(FacesContext context,
                                        UIComponent target)
                                {
                                    if (target.getParent() != null)
                                    {
                                        target.getParent().getChildren().remove(target);
                                    }
                                }
                            });
                    }
                }

It is possible have a child on a facet, so that code will not work on that case. The code
must take into account that scenario and if no child is removed, try to locate and remove
from facets map

-- 
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