2 Replies Latest reply: Aug 27, 2012 10:21 PM by Scott Glazier RSS

    Drag & Drop ajax works once on Portlet Bridge 3.0.0.Beta4 + Rich Faces 4.2.2 + GateIn 3.3 on AS7

    Scott Glazier Newbie

      I am having a problem with the drag and drop functionality with the setup listed in the title.

       

      The page is rendered correctly the first time and I can drag from the source to the target once, but then when going to drag another item from the list no items are draggable. The backing bean is a session scope so if I refresh the page the target item stays there and the source items are draggable one more time.

       

      I inspected the output pages html and before the first render each item in the source lists has the class of "ui-draggable", and after the first drag and drop event the "ui-draggable" reference is no longer there. Refreshing the page with F5 sees this reference return.

       

      I tried the exact same page removing the portlet bridge out of the equation, just a plain rich faces page and the drag and drop functionality works as expected.

       

      As this is my first post I hope I have provided enough information, if I have not please let me know.


      Cheers,

       

      Scott

       


      <ui:composition xmlns="http://www.w3.org/1999/xhtml"

          xmlns:h="http://java.sun.com/jsf/html"

          xmlns:f="http://java.sun.com/jsf/core"

          xmlns:ui="http://java.sun.com/jsf/facelets"

          xmlns:a4j="http://richfaces.org/a4j"

          xmlns:rich="http://richfaces.org/rich">

          <h:head />

          <h:body>

              <h:form id="form1">

                  <rich:panel>

                      <f:facet name="header">

                          <h:outputText value="Source" />

                      </f:facet>

                      <h:dataTable id="src" columns="1"

                          value="#{beanList.usableSatellites}" var="fm"

                          footerClass="footerClass">

                          <h:column>

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

                                  <rich:dragSource type="gnss" dragValue="#{fm}"></rich:dragSource>

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

                              </a4j:outputPanel>

                          </h:column>

                      </h:dataTable>

                  </rich:panel>

                  <rich:panel>

                      <f:facet name="header">

                          <h:outputText value="Disabled" />

                      </f:facet>

                      <rich:dropTarget acceptedTypes="gnss" dropValue="PHP"

                          dropListener="#{beanList.addDisabledSatellite}" render="tgt,src"></rich:dropTarget>

                      <h:dataTable id="tgt" columns="1"

                          value="#{beanList.disabledSatellites}" var="fm">

                          <h:column>

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

                          </h:column>

                      </h:dataTable>

                  </rich:panel>

              </h:form>

          </h:body>

      </ui:composition>