2 Replies Latest reply on Sep 23, 2009 2:19 PM by Snow White CC


    Snow White CC Newbie


      I am getting a "java.lang.ClassCastException" when invoking action listener for a component.
      Error is:

      SEVERE: java.lang.ClassCastException: java.util.ArrayList cannot be cast to javax.faces.model.DataModel

      My Action Listener code is
      public void isValidAccess(ActionEvent event) {
       UIComponent component = event.getComponent();
       System.out.println("Action Listener from Id: " + component.getId());
       isValid = AccessManager.checkElementIdAccess(identity

      and my facelet page is
       <rich:dataTable value="#{lstSoHeaders}" var="item" id="table" rows="25">
       <rich:column sortBy="#{item.soNumber}" >
       <f:facet name="header">SO #</f:facet>
       <a4j:commandLink id="editId" actionListener="#{module1Manager.isValidAccess}" action="#{module1Manager.editModule}" value="#{item.soNumber}" reRender="table"/>
       <f:facet name="header">Entry Date</f:facet>
       <h:outputText value="#{item.entryDate}"/>
       <f:facet name="header">CompanyName</f:facet>
       <h:outputText value="#{item.companyName}" />
       <f:facet name="footer">
       <rich:datascroller for="table" maxPages="8">
       <f:facet name="first">
       <h:outputText value="First" />
       <f:facet name="last">
       <h:outputText value="Last" />

      I did not understand why I am getting this error. Can anyone please help.