[richfaces-issues] [JBoss JIRA] (RF-13103) rich:tree ajax switch type does not work when partial state saving is turned off

Andrey Zhemoytuk (JIRA) jira-events at lists.jboss.org
Tue Jul 23 06:21:26 EDT 2013


     [ https://issues.jboss.org/browse/RF-13103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Zhemoytuk updated RF-13103:
----------------------------------

    Workaround Description: 
The workaround might impact performance (client ids will be recalculated on every tree visit).

{code:java}
public class UITreeWorkaround extends UITree {
  @Override
  public boolean visitTree(VisitContext visitContext, VisitCallback callback)
  {
    // Forces client id to be reset
    for (UIComponent child : getChildren()) {
      child.setId(child.getId());
    }
    return super.visitTree(visitContext, callback);
  }
}
{code}

And in faces-config:

{code:xml}
  <component>
    <component-type>org.richfaces.Tree</component-type>
    <component-class>com.example.UITreeWorkaround</component-class>
  </component>
{code}

  was:
The workaround might impact performance (client ids will be recalculated on every tree visit).


public class UITreeWorkaround extends UITree {
  @Override
  public boolean visitTree(VisitContext visitContext, VisitCallback callback)
  {
    // Forces client id to be reset
    for (UIComponent child : getChildren()) {
      child.setId(child.getId());
    }
    return super.visitTree(visitContext, callback);
  }
}


And in faces-config:

  <component>
    <component-type>org.richfaces.Tree</component-type>
    <component-class>com.example.UITreeWorkaround</component-class>
  </component>



    
> rich:tree ajax switch type does not work when partial state saving is turned off
> --------------------------------------------------------------------------------
>
>                 Key: RF-13103
>                 URL: https://issues.jboss.org/browse/RF-13103
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-tree
>    Affects Versions: 4.3.2
>         Environment: RichFaces 4.3.3.Final
> JSF RI 2.1.19 (same issue with 2.1.24)
>            Reporter: Andrey Zhemoytuk
>
> Tree with ajax switch type do not expand when partial state saving is turned off.
> Clicking node second time gives:
> {code}
> java.lang.IllegalStateException: Component ID treeForm:tree:j_idt4 has already been found in the view.  
> 	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:836)
> 	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:820)
> 	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:820)
> 	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:820)
> 	at com.sun.faces.application.view.FaceletFullStateManagementStrategy.saveView(FaceletFullStateManagementStrategy.java:685)
> 	at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.java:89)
> 	at javax.faces.application.StateManager.getViewState(StateManager.java:553)
> 	at org.richfaces.context.ExtendedPartialViewContextImpl.renderState(ExtendedPartialViewContextImpl.java:416)
> 	at org.richfaces.context.ExtendedPartialViewContextImpl.processPartialRenderPhase(ExtendedPartialViewContextImpl.java:313)
> 	at org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:213)
> 	at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:973)
> 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
> 	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:413)
> 	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
> 	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
> 	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
> 	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
> 	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
> {code}
> Test example:
> {code:xml}
>     <h:form id="treeForm">
>         <rich:tree id="tree"
>                    nodeType="#{node.type}"
>                    var="node"
>                    value="#{treeBean.rootNode}"
>                    toggleType="ajax"
>                    selectionType="ajax">
>             <rich:treeNode type="treeNodeType">
>                 #{node}
>             </rich:treeNode>
>         </rich:tree>
>     </h:form>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the richfaces-issues mailing list