5 Replies Latest reply on Sep 20, 2007 1:50 AM by haoues klklk

    Drop Listener not found exception

    haoues klklk Newbie

      Hi all,
      I tried to implement a basic drag & drop but I am facing this problem when droping the value :

      javax.faces.el.MethodNotFoundException: javax.el.MethodNotFoundException: Method not found: au.com...TeamEditBean@2a2cd10d.addPlayer(org.richfaces.event.DropEvent)
      com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:81)
      org.richfaces.component.UIDropSupport.broadcast(UIDropSupport.java:62)
      javax.faces.component.UIData.broadcast(UIData.java:854)
      org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:186)
      org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
      org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java:280)
      com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:101)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


      Here id my jsp :

      <a4j:region id="list_re" >
      <a4j:outputPanel id="list_op" >
      <rich:dataTable id="ml_dt" value="#{teamMgt.teamEdit.memberList}"
      var="memberWpr" rows="15" width="350px"
      onRowMouseOver="this.style.backgroundColor='#F1E7C3'"
      onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
      columns="1" columnClasses="alignTop" >
      <f:facet name="header">
      <rich:columnGroup>
      <rich:column >
      <rich:datascroller for="ml_dt" maxPages="100" />
      </rich:column>
      <rich:column breakBefore="true" >
      <h:outputText value="Members" />
      </rich:column>
      </rich:columnGroup>
      </f:facet>
      <rich:column>
      <a4j:outputPanel>
      <rich:dragSupport dragIndicator=":indicator"
      dragType="member" dragValue="#{memberWpr.val}">
      <rich:dndParam name="label" value="#{memberWpr.val.surname}, #{memberWpr.val.given}" />
      <rich:dndParam name="default">
      <h:graphicImage value="/images/default.gif"/>
      </rich:dndParam>
      </rich:dragSupport>
      <h:outputText value="#{memberWpr.val.surname}" />
      <h:outputText value=", #{memberWpr.val.given}" />
      <h:outputText value=" (#{memberWpr.val.dob})" />
      </a4j:outputPanel>
      </rich:column>
      </rich:dataTable>
      </a4j:outputPanel>
      </a4j:region>
      <!-- END SELECT ZONE-->

      <!-- PLAYER EDIT ZONE-->
      <a4j:region id="player_re" >
      <a4j:outputPanel id="player_op" >
      <rich:panelBar id="dg_pb" height="100%" width="100%" >
      <rich:panelBarItem label="Player List" >
      <h:panelGrid columns="1" width="100%" cellpadding="5" styleClass="pgComp" >
      <h:dataTable id="gp_dt" value="#{teamMgt.teamEdit.gamePlayerList}" var="gamePlayer" >
      <h:column>
      <a4j:outputPanel id="select_zone" style="border:1px solid gray;padding:2px;" layout="block">
      <h:panelGrid columns="2" cellpadding="5">
      <h:outputText value="#{gamePlayer.val.position}" />
      <h:panelGrid columns="1" >
      <h:outputText value="#{gamePlayer.val.member.surname}" />
      <h:outputText value="#{gamePlayer.val.member.given}" />
      <h:outputText value="#{gamePlayer.val.member.dob}" />
      </h:panelGrid>
      </h:panelGrid>
      <rich:dropSupport
      acceptedTypes="member"
      dropListener="#{teamMgt.teamEdit.addPlayer}" reRender="gp_dt"
      typeMapping="{member: accept}">
      <rich:dndParam name="label" value="Set" />
      <rich:dndParam name="accept">
      <h:graphicImage value="images/accept.gif"/>
      </rich:dndParam>
      </rich:dropSupport>
      </a4j:outputPanel>
      </h:column>
      </h:dataTable>
      </h:panelGrid>
      </rich:panelBarItem>

      <rich:panelBarItem label="Susbtitute" >
      </rich:panelBarItem>
      </rich:panelBar>

      </a4j:outputPanel>
      </a4j:region>


      .. and my bean


      import org.richfaces.component.Dropzone;
      import org.richfaces.event.DropEvent;
      import org.richfaces.event.DropListener;

      ...
      public void addPlayer(DropEvent event){
      // [DEBUG]
      this.log.trace("#================> addPlayer() is processing ...");
      Object val = event.getDragValue();
      if(val == null)
      return;
      Member member = (Member)val;


      //[DEBUG]
      this.log.trace("end addPlayer() <===============================#");
      }

      ...


      Environment :
      - JBoss 2.0.0.GA
      - RF 3.1.0-GA


      Any Help would be great !