Re: Drag/drop multiple items

2017-01-19 Thread Maxim Solodovnik
Actually this is good question :)

- selected items are being stored on server

somehow I missed the fact I can do all processing on server
Thanks a lot for the pointer!


On Thu, Jan 19, 2017 at 6:10 PM, Sebastien  wrote:

> Hi Maxim,
>
> Depending of your selection logic, you have 2 ways:
> - a behavior based solution
> - a component based solution
>
> If you can have a wicket component holding the selection (trough its
> model) then opt for a component based solution. The component will be
> passed to #onDrop so its easy to retrieve the selection (because it's the
> component's model). You can use the draggable "helper" to enhance the
> visual dnd ui (example here [1]).
>
> If the selection is client side only, then I think you need to deal with a
> behavior based solution (no wicket component involved). Tell me if it's
> your case, I can try to help out.
>
> Best regards,
> Sebastien.
>
> [1] https://github.com/sebfz1/wicket-jquery-ui/blob/master/
> wicket-jquery-ui/src/main/java/com/googlecode/wicket/
> jquery/ui/interaction/selectable/SelectableDraggableFactory.java#L38
>
>


-- 
WBR
Maxim aka solomax


Re: Drag/drop multiple items

2017-01-19 Thread Sebastien
Hi Maxim,

Depending of your selection logic, you have 2 ways:
- a behavior based solution
- a component based solution

If you can have a wicket component holding the selection (trough its model)
then opt for a component based solution. The component will be passed to
#onDrop so its easy to retrieve the selection (because it's the component's
model). You can use the draggable "helper" to enhance the visual dnd ui
(example here [1]).

If the selection is client side only, then I think you need to deal with a
behavior based solution (no wicket component involved). Tell me if it's
your case, I can try to help out.

Best regards,
Sebastien.

[1]
https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/interaction/selectable/SelectableDraggableFactory.java#L38


Re: Drag/drop multiple items

2017-01-19 Thread Maxim Solodovnik
Thanks for links Sebastien
Unfortunately I need custom selection logic 
Ill try to check internals of your examples to achieve same results :)

WBR, Maxim
(from mobile, sorry for the typos)

On Jan 19, 2017 16:52, "Sebastien"  wrote:

> Hi Maxim,
>
> The recommended way to dnd multiple items is to use: selectable +
> draggable + droppable
>
> You have 2 examples here:
> http://www.7thweb.net/wicket-jquery-ui/selectable/DraggableSelectablePage
> http://www.7thweb.net/wicket-jquery-ui/selectable/
> TableDraggableSelectablePage
>
> Hope this helps :)
> Sebastien.
>
>


Re: Drag/drop multiple items

2017-01-19 Thread Sebastien
Hi Maxim,

The recommended way to dnd multiple items is to use: selectable + draggable
+ droppable

You have 2 examples here:
http://www.7thweb.net/wicket-jquery-ui/selectable/DraggableSelectablePage
http://www.7thweb.net/wicket-jquery-ui/selectable/TableDraggableSelectablePage

Hope this helps :)
Sebastien.


Re: Wicket 6.23 Jquery reference settings

2017-01-19 Thread nino martinez wael
It could either be that its just missing or that wicket would not be
compatible with 2.x og jquery...

On Thu, Jan 19, 2017 at 10:11 AM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> Yeah I know, just wanted to know why there's no nice setting in 
> JQueryResourceReference
> for the 2.x branch...
>
> On Thu, Jan 19, 2017 at 9:31 AM, Martin Grigorov 
> wrote:
>
>> See org.apache.wicket.resource.DynamicJQueryResourceReference
>>
>> But you can always roll your own ResourceReference that loads any specific
>> version you need.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Thu, Jan 19, 2017 at 9:20 AM, nino martinez wael <
>> nino.martinez.w...@gmail.com> wrote:
>>
>> > Hi from what I can see wicket 6.23 ships with both jquery 1.x and 2.x,
>> how
>> > can I tell wicket to use the 2.x version?
>> >
>> > Looking in JQueryResourceReference it only has version 1.x...
>> >
>> > --
>> > Best regards / Med venlig hilsen
>> > Nino Martinez
>> >
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: Wicket 6.23 Jquery reference settings

2017-01-19 Thread nino martinez wael
Yeah I know, just wanted to know why there's no nice setting in
JQueryResourceReference
for the 2.x branch...

On Thu, Jan 19, 2017 at 9:31 AM, Martin Grigorov 
wrote:

> See org.apache.wicket.resource.DynamicJQueryResourceReference
>
> But you can always roll your own ResourceReference that loads any specific
> version you need.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Jan 19, 2017 at 9:20 AM, nino martinez wael <
> nino.martinez.w...@gmail.com> wrote:
>
> > Hi from what I can see wicket 6.23 ships with both jquery 1.x and 2.x,
> how
> > can I tell wicket to use the 2.x version?
> >
> > Looking in JQueryResourceReference it only has version 1.x...
> >
> > --
> > Best regards / Med venlig hilsen
> > Nino Martinez
> >
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: Wicket 6.23 Jquery reference settings

2017-01-19 Thread Martin Grigorov
See org.apache.wicket.resource.DynamicJQueryResourceReference

But you can always roll your own ResourceReference that loads any specific
version you need.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Jan 19, 2017 at 9:20 AM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> Hi from what I can see wicket 6.23 ships with both jquery 1.x and 2.x, how
> can I tell wicket to use the 2.x version?
>
> Looking in JQueryResourceReference it only has version 1.x...
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>


Wicket 6.23 Jquery reference settings

2017-01-19 Thread nino martinez wael
Hi from what I can see wicket 6.23 ships with both jquery 1.x and 2.x, how
can I tell wicket to use the 2.x version?

Looking in JQueryResourceReference it only has version 1.x...

-- 
Best regards / Med venlig hilsen
Nino Martinez