Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-08 Thread Chris
Update: When setting #setAllowDefault(false), the #onevent method of the web markup container is called, but in addition also the #on select method of sortable. When setting #setAllowDefault(true), the #onevent method is not called at all, only the #on select method. It seems that

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-08 Thread Sebastien
Hi Chris, Sorry for the mistake, its attributes.setEventPropagation(EventPropagation.STOP); Best regards, Sebastien. On Fri, Feb 6, 2015 at 10:12 PM, Chris chris...@gmx.at wrote: Update: When setting #setAllowDefault(false), the #onevent method of the web markup container is called, but

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-08 Thread Chris
Hi Sebastian - thanks for your answer. I experience that when adding #attributes.setEventPropagation, the #onEvent method of infoLink is not called at all, and the #onselect method of the sortable is still called. It would be awesome if you know how to fix it. @Override protected void

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-08 Thread Sebastien
Hi Chris, Actually what you describe is the opposite of what is supposed to happen :) I will try to look at this... There could be several reason: the region occupied by the markup container can be misleading for instance, or there could be a canceling bubble conflict between registered wicket

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-08 Thread Chris
Thanks a lot, with #setAllowDefault(true) the #onEvent(AjaxRequestTarget target) of the respective webmarkupcontainer is called. Nevertheless, after that, the #onselect method of the sortable is called as well. How to prevent this call? br, Chris Am 06.02.2015 um 21:20 schrieb Martin

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-08 Thread Chris
Hi Sebastian, thanks for the solution with #onConfigure - it works. Would it also be an option to remove the item from the liststring and render the sortable again, instead of calling MySortable.this.onRemove? Best regards Am 08.02.2015 um 19:13 schrieb Sebastien seb...@gmail.com: Hi

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-08 Thread Sebastien
Hi Chris, Not sure to understand. OnRemove already removes from the list but also indicates that the model has changed... target.add(MySortable.this) re-render the sortable with the updated list. So everything should work, that's why I am not sure to understand the question... Thanks, Sebastien

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-08 Thread Chris
Hi Sebastian, currently, I am deleting the element that should be removed from the list and render the view again. I am not calling #onRemove, but the code works, too. Therefore, I wanted to ask you if it is better to call #onRemove. br, Chris Am 08.02.2015 um 19:55 schrieb Sebastien

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-08 Thread Sebastien
Hi Chris, Actually jquery ui's selectable provides the ability to prevent their events to be fired. The option is cancel [1] So, as I was testing, here is the full code to manage your remove button: CSS style type=text/css .sortable { list-style-type: none; margin: 0; padding: 0; width:

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-08 Thread Sebastien
Damned, I sent the mail a little bit to quickly... the button does not remove the correct item if it has moved... Will fix that.

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-08 Thread Sebastien
Hi Chris, As I told you earlier (but it seems it was in another post), in our case we need to retrieve the item's data-hash for retrieving and deleting the correct item So the code becomes: item.add(new AjaxLinkVoid(remove) { private static final long serialVersionUID = 1L; @Override

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-08 Thread Sebastien
Hi Chris, So overriding the #updateAjaxAttributes may not help? Right, it seems that the selectable widget registers its event with a higher priority level somehow. The link's click event is just never fired, so we can forget about stopping propagation here. And worst, even an inline onclick

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-08 Thread Chris
Hi Sebastian, i also tried it with the AjaxLink. It seems that the #onselect method is always called first, and only after that the ajaxlink. So overriding the #updateAjaxAttributes may not help? thanks for your help! Chris Am 08.02.2015 um 14:17 schrieb Sebastien seb...@gmail.com: Hi

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-08 Thread Sebastien
Hi Chris, Yes it works like you did but on a strict point of view, its better to notify the component its modelobject changed (and the page is also aware that a child component model has changed)... So event if it is not much important yet, it is still better to call #onRemove because it already

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-06 Thread Chris
Hi Sebastian, thanks for your help. Has that the method signature recently changed? The method #setPreventDefault is not available on the object #attributes. Link link = new AjaxFallbackLinkString(link) { @Override public void onClick(AjaxRequestTarget target) {

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-06 Thread Sebastien
Hi Chris, Yes, generally speaking, you have to cancel bubbling events to parent elements. For a [Ajax]Link (or any event-behavior related) you have to set the preventDefault property to true; protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-06 Thread Martin Grigorov
Hi, On Fri, Feb 6, 2015 at 10:13 PM, Chris chris...@gmx.at wrote: Hi Sebastian, thanks for your help. Has that the method signature recently changed? The method #setPreventDefault is not available on the object #attributes. Link link = new AjaxFallbackLinkString(link) {

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-06 Thread Chris
Hi Sebastian, I would have a follow-up question regarding the #Sortable: Is it possible to add an AjaxLink to the item with its own behavior so that if the user clicks on this link, then its on-click behavior should be called instead of the #onselect method from the sortable. At the moment,

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-05 Thread Sebastien
I've opened the issue: https://github.com/sebfz1/wicket-jquery-ui/issues/153 On Thu, Feb 5, 2015 at 10:29 AM, Sebastien seb...@gmail.com wrote: Hi Chris, Right, Sortable is processing events thought the Event Bus, that's because 2 sortables can be connected and then, these should be able to

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-05 Thread Sebastien
Hi Chris, Right, Sortable is processing events thought the Event Bus, that's because 2 sortables can be connected and then, these should be able to communicate As you are sending the event from the Sortable, you enter the condition: if (event.getSource() instanceof Sortable?) I will try to find

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-04 Thread Tobias Soloschenko
Hi, would you be so kind and apply some more information like StackTrace of the interal server error. Thanks a lot. kind regards Tobias. Am 04.02.15 um 20:05 schrieb Chris: Sven, I have an additional situation where I am getting an internal error. Could you help me in figuring out the

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-04 Thread Chris
Hi Tobias - sorry, here it is: Last cause: mycompany.DeleteItem cannot be cast to java.lang.String WicketMessage: Method onRequest of interface org.apache.wicket.behavior.IBehaviorListener targeted at com.googlecode.wicket.jquery.ui.interaction.selectable.SelectableBehavior$1@127d9785 on

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-04 Thread Sven Meier
Hi, you're using a DeleteItem as payload of the event: send(getPage(), Broadcast.BREADTH, new DeleteItem(target)); Yet in #onRemove() you're casting the payload to a String: java.lang.ClassCastException: tripplanner.mycompany.DeleteItem cannot be cast to java.lang.String

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-04 Thread Chris
Sven, I have an additional situation where I am getting an internal error. Could you help me in figuring out the problem? Panel A senses the selection of an item from a user and adds the „sortable“ as container to the ajax target. In addition, Panel B should be added to the ajax target, using

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-04 Thread Chris
Hi Sven, thanks. The onRemove method is from the class com.googlecode.wicket.jquery.ui.interaction.sortable.Sortable: @Override public void onRemove(AjaxRequestTarget target, String item) { super.onRemove(target, item); } Why is the payload processed in this method, as it takes the target

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-04 Thread Grün Christoph
Sven - thank you. That solved it! Am 04.02.2015 um 14:14 schrieb Sven Meier s...@meiers.net: Your container has to output its markup id: container.setOutputMarkupId() Regards Sven On 04.02.2015 14:11, Chris wrote: Hi, When the user clicks on a certain icon, a specific

Re: Ajax - render Webmarkup-Container based on Wicket Events

2015-02-04 Thread Sven Meier
Your container has to output its markup id: container.setOutputMarkupId() Regards Sven On 04.02.2015 14:11, Chris wrote: Hi, When the user clicks on a certain icon, a specific part of the page should be reloaded through ajax. The icon is part of a panel, the specific part is a

Ajax - render Webmarkup-Container based on Wicket Events

2015-02-04 Thread Chris
Hi, When the user clicks on a certain icon, a specific part of the page should be reloaded through ajax. The icon is part of a panel, the specific part is a webmarkupcontainer added directly to the page. I am using Wicket Events to push the click event. However, when adding the web markup