Re: Possible memory leak in Wicket 1.5.12

2014-12-20 Thread Satrix
Hi, It would be quite hard to reproduce the problem in quickstart application. Here is the code of DynamicImageResource: @Override protected byte[] getImageData(IResource.Attributes attributes) { try { return IOUtils.toByteArray(stream); } catch (IOException ex) {

Re: Possible memory leak in Wicket 1.5.12

2014-12-20 Thread Francois Meillet
Can you show up the entire class ? François Meillet Formation Wicket - Développement Wicket Le 20 déc. 2014 à 09:56, Satrix satrix...@gmail.com a écrit : Hi, It would be quite hard to reproduce the problem in quickstart application. Here is the code of DynamicImageResource:

Re: Possible memory leak in Wicket 1.5.12

2014-12-20 Thread Satrix
Yeah, sure. Here is the code: public class LocalFileResource extends DynamicImageResource { private final Logger LOG = Logger.getLogger(LocalFileResource.class); private String filePath; private InputStream stream; public LocalFileResource(String filePath) throws

Re: Switching between wicket tabs

2014-12-20 Thread Francois Meillet
use parameters PageParameters parameters = new PageParameters(); parameters.set(TAB_NUM, 3); parameters.set(USERNAME_ID, username); setResponsePage(YourCLaasContainingTheTabbedPanel.class, pageParameters); and in your YourCLaasContainingTheTabbedPanel.class extract the parameters int tabindex

Re: Possible memory leak in Wicket 1.5.12

2014-12-20 Thread Francois Meillet
Hi Satrix, When the second constructor is used, with the inputsream argument, the stream is open. When this inputsream is opened ? François Meillet Le 20 déc. 2014 à 10:03, Satrix satrix...@gmail.com a écrit : Yeah, sure. Here is the code: public class LocalFileResource extends

Re: Possible memory leak in Wicket 1.5.12

2014-12-20 Thread Satrix
Hi, It's used very rarely so it should not be a problem. However I've moved the stream creation from the constructor to getImageData method. The important point here - it only happens when the crawler visits my website. When normal users visit my website the file descriptors are closed

Re: Possible memory leak in Wicket 1.5.12

2014-12-20 Thread Francois Meillet
Can you show me the class when you open the stream ? Did you moved the stream creation to the getImageData this morning ? François Meillet Formation Wicket - Développement Wicket Le 20 déc. 2014 à 10:58, Satrix satrix...@gmail.com a écrit : Hi, It's used very rarely so it should not be

Re: Possible memory leak in Wicket 1.5.12

2014-12-20 Thread Satrix
Actually I've checked the code in the second constructor and the stream is the ByteArrayInputStream instance. But I've moved the stream creation from the first constructor to the getImageData because that's the constructor I use to create the 99% of the images in my website. And yes I've changed

Re: Possible memory leak in Wicket 1.5.12

2014-12-20 Thread Francois Meillet
Moving the stream creation, opening and closing it in getImageData is a good thing. You should also remove the second constructor (with the inputstream argument). Now with your tests classes with the WicketTester, (you do have tests ;-) ), you can play yours pages with a debugger and see what

Re: OnChangeAjaxBehavior listened event modified in 1.6.18

2014-12-20 Thread guillaume.mary
Hi, I agree, while typing 'change' is not fired. But 'inputchange' is. (it's an implementation of Wicket, its not an native browser event) So I refined my used case and my problem appears on 'number' text field, when the user uses the arrows to increment or decrement the value: both events are

Re: OnChangeAjaxBehavior listened event modified in 1.6.18

2014-12-20 Thread Martin Grigorov
'inputchange' is 'input' for non-IE browsers and cut/paste for IE If just 'change' does the job then use AjaxFormComponentUpdatingBehavior(change). We have to improve the javadoc of OnChangeAjaxBehavior On Dec 20, 2014 2:13 PM, guillaume.mary guillaume.m...@interview-efm.com wrote: Hi, I

Re: Possible memory leak in Wicket 1.5.12

2014-12-20 Thread Satrix
Looks like it's working now :) Thank you Francois for your help :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Possible-memory-leak-in-Wicket-1-5-12-tp4668856p4668874.html Sent from the Users forum mailing list archive at Nabble.com.