2 Replies Latest reply on May 28, 2009 4:42 AM by nimo stephan

    classcast-exception

    nimo stephan Master

      Why do I get a classcast-exception, when trying to get the actual instance of a rich:extendedDatatable?

      HtmlExtendedDataTable actualDatatable = (HtmlExtendedDataTable)FacesContext.getCurrentInstance().getViewRoot().findComponent("myForm:myDatatable");



      14:53:25,828 FATAL [application] java.lang.ClassCastException: org.richfaces.component.html.HtmlExtendedDataTable
      javax.faces.el.EvaluationException: java.lang.ClassCastException: org.richfaces.component.html.HtmlExtendedDataTable
       at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
       at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
       at javax.faces.component.UICommand.broadcast(UICommand.java:383)
       at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
       at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
       at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
       at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
       at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)