Board index JavaServer Faces General DnD inside DataTable does not work

DnD inside DataTable does not work

Components, Ajax Framework, Utilities and More.


Posts: 2
When integrating a p:droppable inside a h:DataTable, the dropListener method will not be called.

ie:
<h:dataTable id="dataTable" value="#{testbean.displayItems}" var="item">
    <h:column>
        <h:outputText value="some text in a datatable row" />

        <!-- DROPZONE -->
        <p:outputPanel>
            <h:outputLabel value="Drop on me"></h:outputLabel>
            <p:droppable dropListener="#{testbean.onDrop}" />
        </p:outputPanel>

        <!-- DRAGGABLE -->
        <p:outputPanel>
            <h:outputLabel value="drag me"></h:outputLabel>
            <p:draggable />
        </p:outputPanel>
    </h:column>
</h:dataTable>


I put a draggable component in there just for completion, it does not matter where the draggable is/comes from.
If the exact same droppable-containing p:outputPanel were put outside the h:dataTable, dropping onto it would work perfectly fine.

Unfortunately i have no idea why this problem occurs, as it seems that the client-side javascript droppable-widget instantiation code is generated correctly.

I think this may be a primefaces bug, but I will try to look into this further, any suggestions would be appreciated.

Thanks in advance!

Using Primefaces 2.0.2
but also tested it with 2.0.1 and the currently available builds of 2.0.3 and 2.1.

Return to General