Hi Doug,
you're adding a second drop target to your currentContainer:
currentContainer.add(new DropTarget(Operation.COPY) {
...
}.dropBottom("div"));
But there aren't any DIVs contained inside your currentContainer, so
wicket-dnd isn't able to find a drop location.
If you just want to support drop operations even if no items are already
present, you can do so with a single drop target:
currentContainer.add(new DropTarget(Operation.MOVE,
Operation.COPY) {
@Override
public void onDrop(AjaxRequestTarget target, Transfer transfer,
Location location) throws Reject {
System.out.println("(tr) onDrop: " +
transfer.getOperation());
if (location == null) {
// no location supplied -> drop on whole container
} else {
// location supplied -> drop on given location, see
Location#anchor and Location#component
}
}
}.dropTopAndBottom("tr"));
HTH
Sven
Doug Leeper wrote:
Sven,
I have downloaded wicket-dnd and have integrated into our project. I had a
few issues but got around them. The biggest is that we are using DataView
instead of DataTable. While there was no exact example for DataView, I was
able to get through and see what I needed to do:
- needed a "container" apply the DataSource
- needed to item.setOutputMarkupId( true ) in the populateItem
The DropTarget is working (the UI changes when I hover over the
target)...but when I initiate a drop, I get a PageExpiredException.
Any thoughts?
BTW..I have uploaded our simple test case for reference.
Thanks
- Doug
http://www.nabble.com/file/p25859163/DndTestPage.java DndTestPage.java
http://www.nabble.com/file/p25859163/DndTestPage.html DndTestPage.html
http://www.nabble.com/file/p25859163/WicketApplication.java
WicketApplication.java
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org