[
https://issues.apache.org/jira/browse/MYFACES-2685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Leonardo Uribe resolved MYFACES-2685.
-------------------------------------
Fix Version/s: 1.2.9-SNAPSHOT
2.0.1-SNAPSHOT
Resolution: Fixed
> Cannot call invokeOnComponent on UIColumn without rowIndex
> ----------------------------------------------------------
>
> Key: MYFACES-2685
> URL: https://issues.apache.org/jira/browse/MYFACES-2685
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 1.2.8, 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Leonardo Uribe
> Fix For: 1.2.9-SNAPSHOT, 2.0.1-SNAPSHOT
>
>
> Looking some jsf 2.0 code, I notice the current algorithm of
> UIData.invokeOnComponent cannot handle the case when the target is a UIColumn
> instance and no rowIndex is on clientId. Is that ok?
> Checking the new visit tree api, UIData.visitTree cleary says:
> "....If this component has children, for each UIColumn child:
> Call VisitContext.invokeVisitCallback(javax.faces.component.UIComponent,
> javax.faces.component.visit.VisitCallback) on that UIColumn instance. If such
> a call returns true, terminate visiting and return true from this method.
> If the child UIColumn has facets, call
> UIComponent.visitTree(javax.faces.component.visit.VisitContext,
> javax.faces.component.visit.VisitCallback) on each one....."
> I think we should do something like this:
> for (Iterator<UIComponent> itChildren =
> this.getChildren().iterator();
> !returnValue && itChildren.hasNext();)
> {
> UIComponent child = itChildren.next();
> if (child instanceof UIColumn &&
> clientId.equals(child.getClientId()))
> {
> try {
> callback.invokeContextCallback(context, child);
> } catch (Exception e) {
> throw new FacesException(e);
> }
> returnValue = true;
> }
> // process the child's facets
> for (Iterator<UIComponent> itChildFacets =
> child.getFacets().values().iterator();
> !returnValue && itChildFacets.hasNext();)
> {
> //recursive call to find the component
> returnValue =
> itChildFacets.next().invokeOnComponent(context, clientId, callback);
> }
> }
> We can commit this one because this is really a defect-fix, not an
> incomplicant feature.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.