3 Replies Latest reply on Nov 2, 2007 9:11 AM by David Good

    scrollableDataTable drag and drop

    David Good Newbie

      Adding dragSupport to a scrollableDataTable column gives the error below:

      darg:Element with [j_id_jsp_440369434_2:test:testtext]ID was not found in the DOM tree. Probably element has no client ID or client ID hasn't been written. DnD's disabled. Check please!


      There does indeed appear to be no such element in the DOM. Am I missing something, or is this a bug? (markup below)

      <rich:panel>
       <h:form>
       <rich:scrollableDataTable value="#{data}" var="item" rows="25"
       id="test" rowClasses="white,grey" selectedClass="selected">
       <rich:column id="testtext" width="700px">
       <f:facet name="header">
       <h:outputText value="Item" />
       </f:facet>
       <rich:dragSupport></rich:dragSupport>
       <h:outputText value="#{item}" />
       </rich:column>
       </rich:scrollableDataTable>
       </h:form>
      </rich:panel>


        • 1. Re: scrollableDataTable drag and drop
          David Good Newbie

          I should add that I'm using 3.1.2 GA on JBoss 4.2 in rhws

          • 2. Re: scrollableDataTable drag and drop
            Ilya Shaikovsky Master

             

            <h:form id="form">
             <rich:dragIndicator id="indicator">
             <f:facet name="Single">
             <h:panelGroup>
             {marker}
             <h:outputText value="{label}"></h:outputText>
             </h:panelGroup>
             </f:facet>
             </rich:dragIndicator>
             <a4j:outputPanel id="table">
             <rich:scrollableDataTable value="#{capitalsBean.capitals}" var="cap" width="200px" height="250px">
             <f:facet name="header">
             <h:outputText value="Table Header"></h:outputText>
             </f:facet>
             <rich:column>
             <f:facet name="header">
             <h:outputText value="flag"></h:outputText>
             </f:facet>
             <a4j:outputPanel>
             <rich:dragSupport dragType="state" dragValue="#{cap.state}" dragIndicator=":form:indicator">
             <rich:dndParam name="marker">
             <h:graphicImage value="#{cap.stateFlag}"></h:graphicImage>
             </rich:dndParam>
             <rich:dndParam name="label" value="TEST"></rich:dndParam>
             </rich:dragSupport>
             <h:graphicImage value="#{cap.stateFlag}">
             </h:graphicImage>
             </a4j:outputPanel>
             </rich:column>
            


            works fine for me

            • 3. Re: scrollableDataTable drag and drop
              David Good Newbie

              Got mine to work by wrapping rich:dragSupport inside an <a4j:outputPanel>, as in your example. Thanks, Ilya!