1 Reply Latest reply on Oct 31, 2007 12:33 PM by sbibm

    Tree component in Subview causes java.lang.ClassCastExceptio

    sbibm

      I have the following Tree in a subview which i include on other pages. The objective of the Tree is for navigation. I can get it to render, expand/collapse, slide off page etc .. but when I try to submit (non-ajax action) I get this exception .. any thoughts. I am able to get this pattern to work using other Tree components from other JSF libraries .. but need to use Rich Faces if possible.

      java.lang.ClassCastException: org.ajax4jsf.component.UIDataAdaptor$DataState incompatible with [Ljava.lang.Object;

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <%-- jsf:pagecode language="java" location="/src/pagecode/jsps/richfaces/RIFTreeFragNonIBM.java" --%><%-- /jsf:pagecode --%>
      <%@page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%>
      <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <%@taglib uri="http://richfaces.org/a4j" prefix="a4j"%>

      <f:subview id="nav2">
      <h:form id="nav2form" styleClass="form">
      <f:verbatim>



      <div class="menuControl" onclick="setMenu('menu01')">

      </f:verbatim>
      <rich:tree switchType="client" style="width:200px"
      value="#{pathwayBean.pathwayTree}" var="item"
      nodeFace="#{item.type}" id="navtree" onclick="return func_1(this, event);">
      <rich:treeNode type="library" data="#{item.id}">
      <h:outputText value="#{item.type}"/>
      <rich:toolTip>
      <h:outputText value="#{item.type}"/>
      </rich:toolTip>
      </rich:treeNode>
      <rich:treeNode type="pathway" data="#{item.id}">
      <h:outputText value="#{item.name}"/>
      <rich:toolTip>
      <h:outputText value="#{item.name}"/>
      </rich:toolTip>
      </rich:treeNode>
      <rich:treeNode type="organism" data="#{item.id}">
      <h:outputText value="#{item.name}"/>
      <rich:toolTip>
      <h:outputText value="#{item.name}"/>
      </rich:toolTip>

      </rich:treeNode>
      </rich:tree>
      <h:commandButton type="submit" value="Submit" id="richbut"
      styleClass="commandExButton" action="#{pc_RIFTreeFragNonIBM.doRichbutAction}">
      </h:commandButton>


      <f:verbatim>


      </f:verbatim>
      <h:inputTextarea id="textarea1" styleClass="inputTextarea"
      style="visibility: hidden" value="#{navSelection.nodeID}">
      </h:inputTextarea>
      </h:form>
      </f:subview>