You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Manfred Bergmann <mb...@software-by-mabe.com> on 2016/12/17 14:56:24 UTC

Kendo UI ContextMenu (in TreeView?)

Hi.

I'm trying to implement a context menu.
First I tried directly on an AjaxTreeView. Since I couldn't get that to work
(no menu on right-click) I tried to make it as simple as in the context menu
sample, just a text field as "target".
However I couldn't get that to work either.
It works in the sample so I'm wondering what I'm doing wrong.
How can this be further debugged?

The rendered code looks actually good (as far as I can tell):
This is the JavaScript part of the menu:


And this the HTML part:

Just nothing happens when doing the right-click on the text field.
Any clues?


And yeah, does this work on a TreeView?



Manfred

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Kendo-UI-ContextMenu-in-TreeView-tp4676472.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Kendo UI ContextMenu (in TreeView?)

Posted by Sebastien <se...@gmail.com>.
Hi Manfred,

You have to implement the contextmenus's #select callback trough an
ajax-behavior

Here is a basic / fictive example
https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui-samples/src/test/java/com/googlecode/wicket/jquery/ui/samples/MyJQueryLabel.java#L69

And a concrete / complex example:
https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-kendo-ui/src/main/java/com/googlecode/wicket/kendo/ui/widget/treeview/AjaxTreeViewBehavior.java#L222

If you are stuck, please create a quickstart in github with your actual
work and I will try to help out...

Best regards,
Sebastien.


On Wed, Dec 21, 2016 at 9:15 AM, Manfred Bergmann <mb...@software-by-mabe.com>
wrote:

> OK, I got that solved by creating the ContextMenu subclass as a Java class.
>
> Now back to the original question.
>
>
> So the context menu also works in the treeview.
> Now I'd like to get the node of the treeview where the right-click occured
> on.
> Looking at the Telerik sample this seems to be possible:
> http://docs.telerik.com/kendo-ui/controls/navigation/
> treeview/how-to/show-context-menu
>
> But I'm not certain how I would do that using the Wicket wrapper or
> behavior.
> Any hint there?
>
>
> Manfred
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Kendo-UI-ContextMenu-in-TreeView-tp4676472p4676489.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Kendo UI ContextMenu (in TreeView?)

Posted by Manfred Bergmann <mb...@software-by-mabe.com>.
OK, I got that solved by creating the ContextMenu subclass as a Java class.

Now back to the original question.


So the context menu also works in the treeview.
Now I'd like to get the node of the treeview where the right-click occured
on.
Looking at the Telerik sample this seems to be possible:
http://docs.telerik.com/kendo-ui/controls/navigation/treeview/how-to/show-context-menu

But I'm not certain how I would do that using the Wicket wrapper or
behavior.
Any hint there?


Manfred

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Kendo-UI-ContextMenu-in-TreeView-tp4676472p4676489.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Kendo UI ContextMenu (in TreeView?)

Posted by Manfred Bergmann <mb...@software-by-mabe.com>.
Hi.

It seems I found the problem.
I'm developing with Scala (2.12.1) and that seems to be the problem in this
particular case.
Setting the option for the behavior:

ends up as being rendered as a list: ["#menu-target"] instead of just
"#menu-target".
That seems to be because the Scala compiler binds to the variable argument
list set() method in Options.

Not yet sure how to work around that.


Manfred


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Kendo-UI-ContextMenu-in-TreeView-tp4676472p4676484.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Kendo UI ContextMenu (in TreeView?)

Posted by Manfred Bergmann <mb...@software-by-mabe.com>.
Hi Sebastien.

I'm a little bit lost.
I've created a quickstart project but I can't reproduce the issue there.

I keep looking.


Thanks anyway,
Manfred


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Kendo-UI-ContextMenu-in-TreeView-tp4676472p4676482.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Kendo UI ContextMenu (in TreeView?)

Posted by Sebastien <se...@gmail.com>.
Hi Manfred,

Can you please prepare a quickstart (on github for instance) so I can have
a look?

Thanks in advance,
Sebastien.


On Sat, Dec 17, 2016 at 3:56 PM, Manfred Bergmann <mb...@software-by-mabe.com>
wrote:

> Hi.
>
> I'm trying to implement a context menu.
> First I tried directly on an AjaxTreeView. Since I couldn't get that to
> work
> (no menu on right-click) I tried to make it as simple as in the context
> menu
> sample, just a text field as "target".
> However I couldn't get that to work either.
> It works in the sample so I'm wondering what I'm doing wrong.
> How can this be further debugged?
>
> The rendered code looks actually good (as far as I can tell):
> This is the JavaScript part of the menu:
>
>
> And this the HTML part:
>
> Just nothing happens when doing the right-click on the text field.
> Any clues?
>
>
> And yeah, does this work on a TreeView?
>
>
>
> Manfred
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Kendo-UI-ContextMenu-in-TreeView-tp4676472.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>