AbstractPageableView calling IDataProvider.size() when it maybe shouldn't

2016-07-27 Thread Janos Cserep
Hi, I noticed a possible inefficiency in AbstractPageableView's getItemModels() method: /** * This method retrieves the subset of models for items in the current page and allows * RefreshingView to generate items. * * @return iterator over models for items in the current

Re: Link - open modal on left click, new tab/window on right-click/context

2016-07-27 Thread sorinev
Changing the href worked. But it opens the page on both a left click and a right click -> new tab. This may be related to the second part having no effect (stopping the propagation), which may in turn be related to the third part. Since I don't really know javascript, I'm not sure what needs to go

Re: Refreshingview vs ListView

2016-07-27 Thread Entropy
I replaced the RefreshingView with a PropertyListView again, and it fixed the validation message issue. All other changes were still there. Unfortunately, it also breaks my new feature as the ListView won't update on Save. -- View this message in context:

Re: Single Page Applications (SPA), Wicket and the history ajax back issue

2016-07-27 Thread Wayne W
Hi Martin, many thanks for this - I will have a look (just got back from a trip hence delay!) On Sun, Jul 17, 2016 at 9:05 AM, Martin Grigorov wrote: > Hi, > > You might be also interested in Wicketstuff UrlFragment project ( > >

Refreshingview vs ListView

2016-07-27 Thread Entropy
We have a section written by another developer who is gone that I am attempting to modify. It was a ListView where items are added via a plus button, and all items are editable. A new requirement came down to modify some text in the fields on save. I modified the fields as we saved, then add

Re: getJsValuesAfterRendering

2016-07-27 Thread Damianos Metallidis
great!thanks! On 7/27/2016 1:45 PM, Martin Grigorov wrote: On Wed, Jul 27, 2016 at 12:38 PM, Damianos Metallidis

Re: getJsValuesAfterRendering

2016-07-27 Thread Martin Grigorov
On Wed, Jul 27, 2016 at 12:38 PM, Damianos Metallidis wrote: > Hello, > > Thanks for the response as this helped a lot to understand. > > Now i am doing the following, > > On the server-side i have put the below code which gets an > ajaxRequestTarget after the page is

Re: getJsValuesAfterRendering

2016-07-27 Thread Damianos Metallidis
Hello, Thanks for the response as this helped a lot to understand. Now i am doing the following, On the server-side i have put the below code which gets an ajaxRequestTarget after the page is loaded: this.add(new AjaxEventBehavior("load") { @Override protected void

Re: Link - open modal on left click, new tab/window on right-click/context

2016-07-27 Thread Martin Grigorov
Hi, You can override onComponentTag() of this AjaxLink and do tag.put("href", redirectUrl); In addition you need to stop the propagation of the JS event: override #updateAjaxAttributes() and do attributes.setEventPropagation(STOP) One more thing you may need here is a precondition that checks

Re: getJsValuesAfterRendering

2016-07-27 Thread Martin Grigorov
Hi, Here is the order: - Wicket generates the HTML at the server side (onConfigure(), onBeforeRender(), onRender(), onAfterRender()) - Wicket writes the HTML to the HTTP response - the HTML is rendered by the browser (i.e. the timings happen at that phase!) To get the values at the server you