You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martin Dietze <di...@fh-wedel.de> on 2013/02/15 14:20:15 UTC

Another Wicket 6 migration issue: drag and drop (so far done with wiquery)

Another thing I am stuck trying to port my project from Wicket
1.4.x to 6.6.0 is DND-mechanics which so far had been
implemented using wiquery 1.2.

As I see the 'DroppableAjaxBehavior' class has disappeared from
wiquery since the 6.0 release. However no mention could be found
on either migration pages or mailing lists.

So far DND had been implemented like this:

| final DroppableAjaxBehavior droppableBehavior = new DroppableAjaxBehavior<Item<Foo>>() {
|     @Override
|     public void onDrop( Item<Foo> item, AjaxRequestTarget target ) {
|       // [...]
|     }
| };
| droppableBehaviour.getDroppableBehavior().setAccept( new DroppableAccept( ".fileItem" ) );
| droppableBehaviour.getDroppableBehavior().setHoverClass( "dropHover" );
| add( droppableBehaviour );

Now as there's no DroppableAjaxBehavior anymore and no hint on
what replaced it I'm lost. I found a DroppableBehavior coming with
wiquery 6.2.0, but I can't see how this could be a simple
replacement, and to make things worse, there does not seem to be
any sample code for 6.2.0-based DND around.

Any hints?

Cheers,

M'bert

-- 
----------- / http://herbert.the-little-red-haired-girl.org / -------------
=+= 
WE ARE THE BORG - RESISTANCE IS VOLTAGE DIVIDED BY CURRENT!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Another Wicket 6 migration issue: drag and drop (so far done with wiquery)

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Hi,

It seems that behavior was not ported into 6.x branch. I have created

https://github.com/WiQuery/wiquery/issues/17

and will try to fix the issue ASAP.


On Fri, Feb 15, 2013 at 2:20 PM, Martin Dietze <di...@fh-wedel.de> wrote:

> Another thing I am stuck trying to port my project from Wicket
> 1.4.x to 6.6.0 is DND-mechanics which so far had been
> implemented using wiquery 1.2.
>
> As I see the 'DroppableAjaxBehavior' class has disappeared from
> wiquery since the 6.0 release. However no mention could be found
> on either migration pages or mailing lists.
>
> So far DND had been implemented like this:
>
> | final DroppableAjaxBehavior droppableBehavior = new
> DroppableAjaxBehavior<Item<Foo>>() {
> |     @Override
> |     public void onDrop( Item<Foo> item, AjaxRequestTarget target ) {
> |       // [...]
> |     }
> | };
> | droppableBehaviour.getDroppableBehavior().setAccept( new
> DroppableAccept( ".fileItem" ) );
> | droppableBehaviour.getDroppableBehavior().setHoverClass( "dropHover" );
> | add( droppableBehaviour );
>
> Now as there's no DroppableAjaxBehavior anymore and no hint on
> what replaced it I'm lost. I found a DroppableBehavior coming with
> wiquery 6.2.0, but I can't see how this could be a simple
> replacement, and to make things worse, there does not seem to be
> any sample code for 6.2.0-based DND around.
>
> Any hints?
>
> Cheers,
>
> M'bert
>
> --
> ----------- / http://herbert.the-little-red-haired-girl.org /
> -------------
> =+=
> WE ARE THE BORG - RESISTANCE IS VOLTAGE DIVIDED BY CURRENT!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro
Antilia Soft
http://antiliasoft.com/ <http://antiliasoft.com/antilia>

Re: Another Wicket 6 migration issue: drag and drop (so far done with wiquery)

Posted by Martin Dietze <di...@fh-wedel.de>.
On Fri, February 15, 2013, Emond Papegaaij wrote:

> DroppableBehavior is the replacement of DroppableAjaxBehavior. You use it
> like this:
> 
> final DroppableBehavior droppableBehavior = new DroppableBehavior();
> droppableBehavior.setDropEvent( new AjaxDropCallback() {
>     protected void drop(AjaxRequestTarget target, Component source,
> Component dropped) {
>         // [...]
>     }
> } );
> droppableBehavior.setAccept( new DroppableAccept( ".fileItem" ) );
> droppableBehavior.setHoverClass( "dropHover" );
> add( droppableBehavior );

Thank you very much! I just could not find any example from
which to find out how to use it...

Cheers,

M'bert

-- 
----------- / http://herbert.the-little-red-haired-girl.org / -------------
=+= 
Albert Camus wrote that the only serious question is whether to kill yourself
or not.  Tom Robbins wrote that the only serious question is whether time has
a beginning and an end.  Camus clearly got up on the wrong side of bed, and
Robbins must have forgotten to set the alarm.  -- Tom Robbins

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Another Wicket 6 migration issue: drag and drop (so far done with wiquery)

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Hi,

I just added "old AJAX behaviors" for backward compatibility.

On Fri, Feb 15, 2013 at 8:28 PM, Emond Papegaaij
<em...@gmail.com>wrote:

> DroppableBehavior is the replacement of DroppableAjaxBehavior. You use it
> like this:
>
> final DroppableBehavior droppableBehavior = new DroppableBehavior();
> droppableBehavior.setDropEvent( new AjaxDropCallback() {
>     protected void drop(AjaxRequestTarget target, Component source,
> Component dropped) {
>         // [...]
>     }
> } );
> droppableBehavior.setAccept( new DroppableAccept( ".fileItem" ) );
> droppableBehavior.setHoverClass( "dropHover" );
> add( droppableBehavior );
>
> Best regards,
> Emond
>
>
> On Fri, Feb 15, 2013 at 2:20 PM, Martin Dietze <di...@fh-wedel.de> wrote:
>
> > Another thing I am stuck trying to port my project from Wicket
> > 1.4.x to 6.6.0 is DND-mechanics which so far had been
> > implemented using wiquery 1.2.
> >
> > As I see the 'DroppableAjaxBehavior' class has disappeared from
> > wiquery since the 6.0 release. However no mention could be found
> > on either migration pages or mailing lists.
> >
> > So far DND had been implemented like this:
> >
> > | final DroppableAjaxBehavior droppableBehavior = new
> > DroppableAjaxBehavior<Item<Foo>>() {
> > |     @Override
> > |     public void onDrop( Item<Foo> item, AjaxRequestTarget target ) {
> > |       // [...]
> > |     }
> > | };
> > | droppableBehaviour.getDroppableBehavior().setAccept( new
> > DroppableAccept( ".fileItem" ) );
> > | droppableBehaviour.getDroppableBehavior().setHoverClass( "dropHover" );
> > | add( droppableBehaviour );
> >
> > Now as there's no DroppableAjaxBehavior anymore and no hint on
> > what replaced it I'm lost. I found a DroppableBehavior coming with
> > wiquery 6.2.0, but I can't see how this could be a simple
> > replacement, and to make things worse, there does not seem to be
> > any sample code for 6.2.0-based DND around.
> >
> > Any hints?
> >
> > Cheers,
> >
> > M'bert
> >
> > --
> > ----------- / http://herbert.the-little-red-haired-girl.org /
> > -------------
> > =+=
> > WE ARE THE BORG - RESISTANCE IS VOLTAGE DIVIDED BY CURRENT!
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro
Antilia Soft
http://antiliasoft.com/ <http://antiliasoft.com/antilia>

Re: Another Wicket 6 migration issue: drag and drop (so far done with wiquery)

Posted by Emond Papegaaij <em...@gmail.com>.
DroppableBehavior is the replacement of DroppableAjaxBehavior. You use it
like this:

final DroppableBehavior droppableBehavior = new DroppableBehavior();
droppableBehavior.setDropEvent( new AjaxDropCallback() {
    protected void drop(AjaxRequestTarget target, Component source,
Component dropped) {
        // [...]
    }
} );
droppableBehavior.setAccept( new DroppableAccept( ".fileItem" ) );
droppableBehavior.setHoverClass( "dropHover" );
add( droppableBehavior );

Best regards,
Emond


On Fri, Feb 15, 2013 at 2:20 PM, Martin Dietze <di...@fh-wedel.de> wrote:

> Another thing I am stuck trying to port my project from Wicket
> 1.4.x to 6.6.0 is DND-mechanics which so far had been
> implemented using wiquery 1.2.
>
> As I see the 'DroppableAjaxBehavior' class has disappeared from
> wiquery since the 6.0 release. However no mention could be found
> on either migration pages or mailing lists.
>
> So far DND had been implemented like this:
>
> | final DroppableAjaxBehavior droppableBehavior = new
> DroppableAjaxBehavior<Item<Foo>>() {
> |     @Override
> |     public void onDrop( Item<Foo> item, AjaxRequestTarget target ) {
> |       // [...]
> |     }
> | };
> | droppableBehaviour.getDroppableBehavior().setAccept( new
> DroppableAccept( ".fileItem" ) );
> | droppableBehaviour.getDroppableBehavior().setHoverClass( "dropHover" );
> | add( droppableBehaviour );
>
> Now as there's no DroppableAjaxBehavior anymore and no hint on
> what replaced it I'm lost. I found a DroppableBehavior coming with
> wiquery 6.2.0, but I can't see how this could be a simple
> replacement, and to make things worse, there does not seem to be
> any sample code for 6.2.0-based DND around.
>
> Any hints?
>
> Cheers,
>
> M'bert
>
> --
> ----------- / http://herbert.the-little-red-haired-girl.org /
> -------------
> =+=
> WE ARE THE BORG - RESISTANCE IS VOLTAGE DIVIDED BY CURRENT!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>