4 Replies Latest reply on Nov 18, 2007 7:29 AM by solusres

    Strange drag/drop behaviour

    tbjerch

      Strange drag/drop behaviour

      It seems that there is a problem when a drag operations is initiated from a picture. In the code-snippet below, the drag indicator look identical when the drag operation is initiated with mouse over the text "MyCard" or over the picture card.jpg.

      It is however only droppable if initiated with the mouse over the text. Any clues?

      ...
      <rich:panel>
       <rich:dragSupport dragType="card" dragIndicator="dragIcon">
       <rich:dndParam name="label" value="MyCard" />
       </rich:dragSupport>
       <h:graphicImage value="/card.jpg" />
       <h:outputText id="cardId" value="Card #{game.score}"/>
      </rich:panel>
      ...
      <rich:panel>
       <rich:dropSupport id="eq" acceptedTypes="card"
       dropValue="card" dropListener="#{game.processDrop}"
       reRender="score, result, cardId">
       </rich:dropSupport>
       <h:graphicImage value="/equipment.jpg"/>
      </rich:panel>
      ...