0 Replies Latest reply on Mar 5, 2013 12:57 PM by RK 39

    Composite Component Problem

    RK 39 Newbie



      I am facing a problem while using composite component.


      In my xhtml page I am using composite component. Along with it there are other jsf components.


      There is action button in composite component. On first click I am loding  data. This is working fine . After next click on any of the buttons in page I am getting error.


      javax.faces.FacesException: Unexpected error restoring state for component with id transferType.  Cause: java.lang.ClassCastException: javax.faces.component.StateHolderSaver cannot be cast to [Ljava.lang.Object;.

              at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:250)

              at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:147)




      This is the code in xhtml for the id (transferType) exception is raised.


      <h:selectOneMenu styleClass="selectInput" label="transferTypeLabel" valueChangeListener="#{transferInInstructionDetailsUiBean.transferReasonValueChangeListener}"                               rendered="# {!transferInFieldVisibilityBean.isTransferReasonReadOnly()}" id="transferType" value="#{transferInInstructionDetailsUiBean.transferReason}" >

                                                  <a4j:ajax event="change" render="spousalInformationPanel" />

                                                  <f:selectItems value="#{transferInInstructionDetailsUiBean.transferReasons}" />





      I removed <a4j:ajax event="change" render="spousalInformationPanel" /> .


      After removing this a4j:ajax  tag evry thing is working fine.




      Note: Instead of composite component if I use normal components every thing is  working fine.This exception is coming only for the components that contains ajax tag.


      Please any help me out in this.