DnD inside DataTable does not work

UI Components for JSF
Post Reply
gabtub
Posts: 2
Joined: 02 Jun 2010, 22:04

09 Jul 2010, 14:45

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

ie:

Code: Select all

<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.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 17 guests