1 Reply Latest reply on May 21, 2007 4:04 PM by mladen babic

    DropListener doesn't work

    mladen babic Newbie

      Hi

      I've tried to add dropsupport component but when I drop picture to drop zone it throws exeption MethodNotFoundException.I'm sure that my method has been wrote correctly.This is fragment of my code

      public void addProductDragging(DropEvent e){
      FacesContext context = FacesContext.getCurrentInstance();
      
       Product dragProduct=new Product();
      
       dragProduct.setName(context.getExternalContext().getRequestParameterMap().
      
       get("name").toString());
       System.out.println("Product dragging is .........."+dragProduct.getName());
      
       System.out.println("Value is "+e.getDragType().toString());
      }
      
      

      AND
      ....
      <a4j:outputPanel style="border:1px solid gray;padding:2px;"
       layout="block">
       <rich:dragSupport dragIndicator=":indicator"
       dragType="text" >
       <a4j:actionparam value="#{start.name}" name="name"/>
       </rich:dragSupport>
      
      . ......................
      
      <rich:panel style="width:100px;height:100px;">
      
       <f:facet name="header">Drop Zone</f:facet>
      
       <rich:dropSupport id="dropProduct" acceptedTypes="text" reRender="basket"
      
       dropListener="#{basketHandlerBean.addProductDragging}"/>
      


      Best regards,
      mb