0 Replies Latest reply on Jun 11, 2012 11:52 AM by k m

    dragSource dont want to be dropped

    k m Newbie

      Hi folks,

       

      I've got a problem with the drag and drop components.

      I want to drag an item from one table to an other with a customized dragIndicator.

      With the default settings everything is okey. But when I add the dragIndicator to the dragSource,

      either the dropTarget don't want to take the dragSource or the dragSource don't want to be dropped.

       

      And I have no idea why. Can somebody help?

       

      Here's my config:

       

      {code}

      <h:form id="searchApplicationForm" acceptcharset="UTF-8">

      <rich:panel header="#{titles.assignedApplications}">

          <a4j:outputPanel layout="block" id="applicationDiv">

              <rich:dropTarget dropValue="applicationVar"

                               acceptedTypes="applicationVar"

                               dropListener="#{Controller.processDrop}"

                               render="applicationsAvailableDiv, applicationDiv"/>

              <rich:dataTable id="appTable"

                              value="#{Controller.assignedApplicationList}"

                              var="applicationAssigned"

                              binding="#{Controller.dataTableAssigned}">

                  [...]

              </rich:dataTable>

          </a4j:outputPanel>

      </rich:panel>

       

      <rich:panel header="#{titles.availableApplications}">

          <a4j:outputPanel layout="block" id="applicationsAvailableDiv">

              <rich:dataTable id="appAvailableTable"

                              value="#{Controller.applicationList}"

                              var="applicationVar"

                              binding="#{Controller.dataTableAvailable}">

                  <rich:column>

                      <a4j:outputPanel layout="block">

                          <rich:dragIndicator id="indicator" [..styles..]>

                              <h:outputText value="#{applicationVar.name}" />

                          </rich:dragIndicator>

                          <rich:dragSource type="applicationVar"

                                           dragIndicator="indicator"                // without, it works

                                           dragValue="#{applicationVar}" />

                          <h:outputText value="#{applicationVar.name}"/>

                      </a4j:outputPanel>

                  </rich:column>

                  <rich:column>

                      <a4j:outputPanel layout="block">

                          <rich:dragSource type="applicationVar"

                                          dragIndicator="indicator"

                                           dragValue="#{applicationVar}" />

                          <a4j:commandButton image="/images/icons/collectors/details_norm.png"

                                             oncomplete="#{rich:component('DetailsMP')}.show()"

                                             render="detailsPanelDiv"/>

                      </a4j:outputPanel>

                  </rich:column>          

              </rich:dataTable>

          </a4j:outputPanel>

      </rich:panel>

      </h:form>

      {code}