Re: Wicket context menu component

2013-06-17 Thread bronius
Hi Sebastien, Thats great news, I prefer to use library version as it has a lot of advantages over rolling my own solution. I tried yours and it works fine for me. I think example of how to recognize which link was clicked in demo would be helpful for others, as context menu will certainly need

Re: Wicket context menu component

2013-06-17 Thread Sebastien
Hi Bronius, You're welcome! Yes, the usage you performed is the intended one. In your case however, maybe you can optimize it, because when a menu-item is clicked, both IMenuItem#onClick() and Menu#onClick() are triggered (in that order). So instead of a 'switch' statement in Menu#onClick(), you

Re: Wicket context menu component

2013-06-17 Thread bronius
Yes I agree, thanks again :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-context-menu-component-tp4659306p4659544.html Sent from the Users forum mailing list archive at Nabble.com. - To

Re: Wicket context menu component

2013-06-15 Thread Sebastien
Hi Bronius, As (just) said in another thread, I did implement a ContextMenu in wicket-jquery-ui. http://apache-wicket.1842946.n4.nabble.com/Dynamic-Context-Menu-using-wicket-jquery-ui-td4659437.html But, if you still wish/prefer continue implementing the context-menu plugin, please post a

Re: Wicket context menu component

2013-06-12 Thread bronius
Ok thanks again for helping out! :) Well I found that 'options.$trigger.attr(id)' from parameters returns id of link pressed (did not try yet on wicket side, but I think it should work) and 'key' returns which context menu was pressed. Now my links represents users and context menu some actions to

Re: Wicket context menu component

2013-06-11 Thread bronius
Hi thanks for help! With your explanations and MenuBehavior example I made it work. Now one last thing is to recognize which link was chosen for context menu. I see this documentation about callback: (function) callback Specifies the default callback to be used in case an item does not expose

Re: Wicket context menu component

2013-06-11 Thread Sebastien
Hi, glad to read it is almost working :) getQueryParameterValue(options) does return anything because it's not transmitted server side (due to CallbackParameter.context(options), which does not pass the parameter to the ajax callback). But even you did transmit it, you probably got an [object]

Re: Wicket context menu component

2013-06-10 Thread Sebastien
Hi, Did you looked at the Menu implementation? I think it should be close to what you want to achieve: https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/widget/menu/MenuBehavior.java Here, the way to retrieve the menu-item id is

Re: Wicket context menu component

2013-06-10 Thread Martin Grigorov
Hi Sebastien, On Mon, Jun 10, 2013 at 11:04 AM, Sebastien seb...@gmail.com wrote: Hi, Did you looked at the Menu implementation? I think it should be close to what you want to achieve:

Re: Wicket context menu component

2013-06-10 Thread bronius
Hi, Yes I checked it. I also was reading this: http://code.google.com/p/wicket-jquery-ui/wiki/HowToCreatePlugin2. However context menu plug in was not standard here is jquery example: $(function(){ $.contextMenu({ selector: '.context-menu-one', callback: function(key,

Re: Wicket context menu component

2013-06-10 Thread Sebastien
Hi Martin, Thanks for the tips! Actually, the way how the wicket-jquery-ui Menu works can a little bit be compared to the Tree implementation in wicket-extensions. In my case, I think the markup is easier to use, considering there is a recursive loop for sub-menus... Thanks again best regards,

Re: Wicket context menu component

2013-06-10 Thread Sebastien
Hi, I think what is missing you is the AjaxBehavior / Event / jQuery event binding. Basically, your ContextMenuBehavior (CMB) should embed an ajax behavior (JQueryAjaxBehavior, let's say AB). A common Event object (E) should be shared between CMB AB. Note that CMB should implement