0 Replies Latest reply on Sep 28, 2011 8:35 AM by mengueloby

    Drag n drop on richfaces 4

    mengueloby

      Hi, I read discussion about this topic but i always have problems. Here is my code

      <rich:panel >

          <h:dataTable id="src" columns="1" value="#{mysession.list2art}" var="fm" >

              <h:column>

                  <a4j:outputPanel layout="block" styleClass="rf-ind-drag">

                      <rich:dragSource type="articlelangue"   dragValue="#{fm.article.titre}" />

                      <h:outputText value="#{fm.article.titre}"/>

                  </a4j:outputPanel>

              </h:column>

              </h:dataTable>

      </rich:panel>

      <rich:panel >

          <a4j:outputPanel >

              <rich:dropTarget acceptedTypes="articlelangue"  dropListener="#{mysession.processDrop}" render="pan4"/>

              <h:outputText value="Deposez"/>

          </a4j:outputPanel>

      </rich:panel>

      The drag is ok because I see the object dragged, but when I make the drop nothing happens. This is my processDrop method

      public void processDrop(DropEvent e){
                Articlelangue a= (Articlelangue) e.getDragValue();
                System.out.println(a);
                System.out.println(e.getDropValue().toString());
           }

      Any suggestion will be welcome

      Thanks