Re: [REQUEST] Integrate Wicket and Nutch for Google Summer of Code 2014
Hi Lewis, I'm glad you contacted us! I see the ticket has been opened for few years now. This is a shame! We should have coordinated this task much earlier! Nutch could be the next Apache project that uses Wicket for its web administration needs. There are few other projects already. I've added myself as a watcher to the ticket and I will be glad to help with Wicket expertize. If there is any interest in Wicket mailing list about GSOC we will definitely link to your task! Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 1:59 AM, Lewis John Mcgibbney lewis.mcgibb...@gmail.com wrote: Hi dev@, My name is Lewis, I am a committer over on Apache Nutch. I'm writing to the dev@ list in an attempt to interest students in participating in this years GSoC. The idea is to create a Wicket-based Web Application for Nutch as a GSoC project. For those that might be interested the project idea can be seen here [0]. I would very much appreciate if any potential students could be forwarded my details or guided towards d...@nutch.apache.org so we can gather interest in the project. I would also like to write to the user@ list regarding this topic. Thank you in advance Lewis [0] https://issues.apache.org/jira/browse/NUTCH-841 -- *Lewis*
Re: WicketTester.isRenderedPage() in 6.13
I have created a new page with link and then execute: DummyBasePage page = new DummyBasePage(action); startPage(page); clickLink(page.getActionLink()); where action link is a link to another page. But it is still not working, only DummyBasePage is rendered. Then I look into WicketTester code and I have found that there are hard coded links' classes! So the code that is implemented inside a link class is ommited and its logic is doubled inside WicketTester. It looks to me as a very bad design (eg. I cannot test other link implementations). Finally it looks like WicketTester functionality was degraded comparing to 1.4, where application code could be easily testable in WicketTester and in 6.x the code that works ok in real application is not supported by WicketTester :(. Could it be possible to add to WicketTester handling such methods from RequestCycle: setResponsePage(), setResponse()? -- Daniel On Wed, Feb 5, 2014 at 1:51 PM, Martin Grigorov mgrigo...@apache.orgwrote: Component#setResponsePage() just delegates to RequestCycle#setResponsePage(). So it is the same. I'm saying that you should not use tester.getRequestCycle().xyz(). I.e. do not set the new page in the test code. Set it in the real application code. Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 1:47 PM, Daniel Stoch daniel.st...@gmail.com wrote: In my real application there are calls to RequestCycle.setResponsePage(...) which are hidden by more advanced action/navigation framework. So I cannot simply replace them by component.setResponsePage(). I think that if RequestCycle.setResponsePage(...) is valid for real application, it should also be valid for tests. Am I wrong? -- Daniel On Wed, Feb 5, 2014 at 1:14 PM, Martin Grigorov mgrigo...@apache.org wrote: You should not use tester.getRequestCycle().setResponsePage(DummyBasePage. class); You should do something like: - in the test code: tester.startPage(Page1.class) - in your real application code: Page1 or in its components you can use setResponsePage(Page2.class) - finally in the test code: tester.assertRenderedPage(Page2.class) Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 12:18 PM, Daniel Stoch daniel.st...@gmail.com wrote: Ok, but what I should call to render DummyBasePage after calling: tester.getRequestCycle().setResponsePage(DummyBasePage.class); without making a new request? -- Daniel On Wed, Feb 5, 2014 at 12:01 PM, Martin Grigorov mgrigo...@apache.org wrote: #processRequest() triggers a new request to the server so first the page is rendered, then a new request to the default destination is made, so the home page is rendered and lastRenderedPage changes Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 11:39 AM, Daniel Stoch daniel.st...@gmail.com wrote: One more question: what is a difference between these two calls: 1. tester.startPage(DummyBasePage.class); Result result = tester.isRenderedPage(DummyBasePage.class); 2. tester.getRequestCycle().setResponsePage(DummyBasePage.class); tester.processRequest(); Result result = tester.isRenderedPage(DummyBasePage.class); The first one works ok (DummyBasePage is rendered), but the second fails: HomePage is rendered instead of DummyBasePage. Why? -- Daniel On Wed, Feb 5, 2014 at 10:40 AM, Martin Grigorov mgrigo...@apache.org wrote: Try with tester.setExposeExceptions(false) before making the request to the secured page Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 10:33 AM, Daniel Stoch daniel.st...@gmail.com wrote: Hi, I'm during migration from Wicket 1.4.x to 6.x and I have the following problem with WicketTester. I have some secured page, during its initialization some kind of AuthorizationException is raised. It should end with displaying standard AccessDeniedPage. Here is a code fragment from test case: 1.4.x: RequestCycle.get().setResponsePage(SecuredDummyPage.class); tester.processRequestCycle(requestCycle); Result result = tester.isRenderedPage(AccessDeniedPage.class); assertFalse(result.getMessage(), result.wasFailed()); This test is passed. But in 6.13 the similar test: RequestCycle.get().setResponsePage(SecuredDummyPage.class); tester.processRequest(); // or tester.startPage(SecuredDummyPage.class) Result result = tester.isRenderedPage(AccessDeniedPage.class);
Re: WicketTester.isRenderedPage() in 6.13
I have looked inside 1.4 and the code inside a clickLink() is very similar, so this is not a case to 6.x. But still it would be nice to have RequestCycle#setResponsePage() working ;). -- Daniel On Thu, Feb 6, 2014 at 10:00 AM, Daniel Stoch daniel.st...@gmail.comwrote: I have created a new page with link and then execute: DummyBasePage page = new DummyBasePage(action); startPage(page); clickLink(page.getActionLink()); where action link is a link to another page. But it is still not working, only DummyBasePage is rendered. Then I look into WicketTester code and I have found that there are hard coded links' classes! So the code that is implemented inside a link class is ommited and its logic is doubled inside WicketTester. It looks to me as a very bad design (eg. I cannot test other link implementations). Finally it looks like WicketTester functionality was degraded comparing to 1.4, where application code could be easily testable in WicketTester and in 6.x the code that works ok in real application is not supported by WicketTester :(. Could it be possible to add to WicketTester handling such methods from RequestCycle: setResponsePage(), setResponse()? -- Daniel On Wed, Feb 5, 2014 at 1:51 PM, Martin Grigorov mgrigo...@apache.orgwrote: Component#setResponsePage() just delegates to RequestCycle#setResponsePage(). So it is the same. I'm saying that you should not use tester.getRequestCycle().xyz(). I.e. do not set the new page in the test code. Set it in the real application code. Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 1:47 PM, Daniel Stoch daniel.st...@gmail.com wrote: In my real application there are calls to RequestCycle.setResponsePage(...) which are hidden by more advanced action/navigation framework. So I cannot simply replace them by component.setResponsePage(). I think that if RequestCycle.setResponsePage(...) is valid for real application, it should also be valid for tests. Am I wrong? -- Daniel On Wed, Feb 5, 2014 at 1:14 PM, Martin Grigorov mgrigo...@apache.org wrote: You should not use tester.getRequestCycle().setResponsePage(DummyBasePage. class); You should do something like: - in the test code: tester.startPage(Page1.class) - in your real application code: Page1 or in its components you can use setResponsePage(Page2.class) - finally in the test code: tester.assertRenderedPage(Page2.class) Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 12:18 PM, Daniel Stoch daniel.st...@gmail.com wrote: Ok, but what I should call to render DummyBasePage after calling: tester.getRequestCycle().setResponsePage(DummyBasePage.class); without making a new request? -- Daniel On Wed, Feb 5, 2014 at 12:01 PM, Martin Grigorov mgrigo...@apache.org wrote: #processRequest() triggers a new request to the server so first the page is rendered, then a new request to the default destination is made, so the home page is rendered and lastRenderedPage changes Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 11:39 AM, Daniel Stoch daniel.st...@gmail.com wrote: One more question: what is a difference between these two calls: 1. tester.startPage(DummyBasePage.class); Result result = tester.isRenderedPage(DummyBasePage.class); 2. tester.getRequestCycle().setResponsePage(DummyBasePage.class); tester.processRequest(); Result result = tester.isRenderedPage(DummyBasePage.class); The first one works ok (DummyBasePage is rendered), but the second fails: HomePage is rendered instead of DummyBasePage. Why? -- Daniel On Wed, Feb 5, 2014 at 10:40 AM, Martin Grigorov mgrigo...@apache.org wrote: Try with tester.setExposeExceptions(false) before making the request to the secured page Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 10:33 AM, Daniel Stoch daniel.st...@gmail.com wrote: Hi, I'm during migration from Wicket 1.4.x to 6.x and I have the following problem with WicketTester. I have some secured page, during its initialization some kind of AuthorizationException is raised. It should end with displaying standard AccessDeniedPage. Here is a code fragment from test case: 1.4.x: RequestCycle.get().setResponsePage(SecuredDummyPage.class); tester.processRequestCycle(requestCycle); Result result = tester.isRenderedPage(AccessDeniedPage.class); assertFalse(result.getMessage(), result.wasFailed()); This test is
Re: WicketTester.isRenderedPage() in 6.13
I am actually wondering how to hide this API from the developer in the tests. The idea of the tester is to simulate sending requests to the pages/resources. tester.getRequestCycle().setResponsePage() doesn't test anything in the application. tester.getRequestCycle().setResponsePage() is like to replace the current page in the browser without sending request to the server and to expect for example that server push (websocket, server sent events, ...) will still work with your new page. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 10:05 AM, Daniel Stoch daniel.st...@gmail.comwrote: I have looked inside 1.4 and the code inside a clickLink() is very similar, so this is not a case to 6.x. But still it would be nice to have RequestCycle#setResponsePage() working ;). -- Daniel On Thu, Feb 6, 2014 at 10:00 AM, Daniel Stoch daniel.st...@gmail.com wrote: I have created a new page with link and then execute: DummyBasePage page = new DummyBasePage(action); startPage(page); clickLink(page.getActionLink()); where action link is a link to another page. But it is still not working, only DummyBasePage is rendered. Then I look into WicketTester code and I have found that there are hard coded links' classes! So the code that is implemented inside a link class is ommited and its logic is doubled inside WicketTester. It looks to me as a very bad design (eg. I cannot test other link implementations). Finally it looks like WicketTester functionality was degraded comparing to 1.4, where application code could be easily testable in WicketTester and in 6.x the code that works ok in real application is not supported by WicketTester :(. Could it be possible to add to WicketTester handling such methods from RequestCycle: setResponsePage(), setResponse()? -- Daniel On Wed, Feb 5, 2014 at 1:51 PM, Martin Grigorov mgrigo...@apache.org wrote: Component#setResponsePage() just delegates to RequestCycle#setResponsePage(). So it is the same. I'm saying that you should not use tester.getRequestCycle().xyz(). I.e. do not set the new page in the test code. Set it in the real application code. Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 1:47 PM, Daniel Stoch daniel.st...@gmail.com wrote: In my real application there are calls to RequestCycle.setResponsePage(...) which are hidden by more advanced action/navigation framework. So I cannot simply replace them by component.setResponsePage(). I think that if RequestCycle.setResponsePage(...) is valid for real application, it should also be valid for tests. Am I wrong? -- Daniel On Wed, Feb 5, 2014 at 1:14 PM, Martin Grigorov mgrigo...@apache.org wrote: You should not use tester.getRequestCycle().setResponsePage(DummyBasePage. class); You should do something like: - in the test code: tester.startPage(Page1.class) - in your real application code: Page1 or in its components you can use setResponsePage(Page2.class) - finally in the test code: tester.assertRenderedPage(Page2.class) Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 12:18 PM, Daniel Stoch daniel.st...@gmail.com wrote: Ok, but what I should call to render DummyBasePage after calling: tester.getRequestCycle().setResponsePage(DummyBasePage.class); without making a new request? -- Daniel On Wed, Feb 5, 2014 at 12:01 PM, Martin Grigorov mgrigo...@apache.org wrote: #processRequest() triggers a new request to the server so first the page is rendered, then a new request to the default destination is made, so the home page is rendered and lastRenderedPage changes Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 11:39 AM, Daniel Stoch daniel.st...@gmail.com wrote: One more question: what is a difference between these two calls: 1. tester.startPage(DummyBasePage.class); Result result = tester.isRenderedPage(DummyBasePage.class); 2. tester.getRequestCycle().setResponsePage(DummyBasePage.class); tester.processRequest(); Result result = tester.isRenderedPage(DummyBasePage.class); The first one works ok (DummyBasePage is rendered), but the second fails: HomePage is rendered instead of DummyBasePage. Why? -- Daniel On Wed, Feb 5, 2014 at 10:40 AM, Martin Grigorov mgrigo...@apache.org wrote: Try with tester.setExposeExceptions(false) before making the request to the secured page Martin Grigorov Wicket Training and Consulting On Wed, Feb 5,
Re: WicketTester.isRenderedPage() in 6.13
If you see any regressions in WicketTester since 1.4.x/1.5.x please report ticket with a test case. I believe it is even much more powerful than in 1.4.x but since there was redesign of WicketTester in 1.5.0 there could be regressions. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 10:14 AM, Martin Grigorov mgrigo...@apache.orgwrote: I am actually wondering how to hide this API from the developer in the tests. The idea of the tester is to simulate sending requests to the pages/resources. tester.getRequestCycle().setResponsePage() doesn't test anything in the application. tester.getRequestCycle().setResponsePage() is like to replace the current page in the browser without sending request to the server and to expect for example that server push (websocket, server sent events, ...) will still work with your new page. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 10:05 AM, Daniel Stoch daniel.st...@gmail.comwrote: I have looked inside 1.4 and the code inside a clickLink() is very similar, so this is not a case to 6.x. But still it would be nice to have RequestCycle#setResponsePage() working ;). -- Daniel On Thu, Feb 6, 2014 at 10:00 AM, Daniel Stoch daniel.st...@gmail.com wrote: I have created a new page with link and then execute: DummyBasePage page = new DummyBasePage(action); startPage(page); clickLink(page.getActionLink()); where action link is a link to another page. But it is still not working, only DummyBasePage is rendered. Then I look into WicketTester code and I have found that there are hard coded links' classes! So the code that is implemented inside a link class is ommited and its logic is doubled inside WicketTester. It looks to me as a very bad design (eg. I cannot test other link implementations). Finally it looks like WicketTester functionality was degraded comparing to 1.4, where application code could be easily testable in WicketTester and in 6.x the code that works ok in real application is not supported by WicketTester :(. Could it be possible to add to WicketTester handling such methods from RequestCycle: setResponsePage(), setResponse()? -- Daniel On Wed, Feb 5, 2014 at 1:51 PM, Martin Grigorov mgrigo...@apache.org wrote: Component#setResponsePage() just delegates to RequestCycle#setResponsePage(). So it is the same. I'm saying that you should not use tester.getRequestCycle().xyz(). I.e. do not set the new page in the test code. Set it in the real application code. Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 1:47 PM, Daniel Stoch daniel.st...@gmail.com wrote: In my real application there are calls to RequestCycle.setResponsePage(...) which are hidden by more advanced action/navigation framework. So I cannot simply replace them by component.setResponsePage(). I think that if RequestCycle.setResponsePage(...) is valid for real application, it should also be valid for tests. Am I wrong? -- Daniel On Wed, Feb 5, 2014 at 1:14 PM, Martin Grigorov mgrigo...@apache.org wrote: You should not use tester.getRequestCycle().setResponsePage(DummyBasePage. class); You should do something like: - in the test code: tester.startPage(Page1.class) - in your real application code: Page1 or in its components you can use setResponsePage(Page2.class) - finally in the test code: tester.assertRenderedPage(Page2.class) Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 12:18 PM, Daniel Stoch daniel.st...@gmail.com wrote: Ok, but what I should call to render DummyBasePage after calling: tester.getRequestCycle().setResponsePage(DummyBasePage.class); without making a new request? -- Daniel On Wed, Feb 5, 2014 at 12:01 PM, Martin Grigorov mgrigo...@apache.org wrote: #processRequest() triggers a new request to the server so first the page is rendered, then a new request to the default destination is made, so the home page is rendered and lastRenderedPage changes Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 11:39 AM, Daniel Stoch daniel.st...@gmail.com wrote: One more question: what is a difference between these two calls: 1. tester.startPage(DummyBasePage.class); Result result = tester.isRenderedPage(DummyBasePage.class); 2. tester.getRequestCycle().setResponsePage(DummyBasePage.class); tester.processRequest(); Result result = tester.isRenderedPage(DummyBasePage.class); The first one works ok (DummyBasePage is rendered), but the second fails: HomePage is rendered instead of DummyBasePage. Why?
Re: Changed JSESSIONID Results in Wicket Exception
https://issues.apache.org/jira/browse/WICKET-5500 Martin Grigorov Wicket Training and Consulting On Wed, Feb 5, 2014 at 11:50 PM, Aaron J. Garcia agar...@rentec.com wrote: Martin Grigorov mgrigorov at apache.org writes: Hi, I will test this tomorrow. Martin Grigorov Wicket Training and Consulting Thanks Martin, FWIW, I was setting this when running Tomcat: -Dwicket.jsessionid.name=JSESSIONID_MYAPP It didn't work with the -D option, so I added it to my class that extends WebApplication, like so: System.setProperty(wicket.jsessionid.name, JSESSIONID_MYAPP); and that didn't work either. I'm happy to help pinpoint the issue however I can. Please let me know. -- Aaron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[CVE-2013-2055] Apache Wicket information disclosure vulnerability
Severity: Important Vendor: The Apache Software Foundation Affected versions: Apache Wicket 1.4.22, 1.5.10 and 6.7.0 Description CVE-2013-2055https://wicket.apache.org/2014/02/06/cve-2013-2055.html : It is possible to make Wicket deliver the HTML templates in their raw/non-processed form. An attacker could see any sensitive information in the part of the HTML template that is usually ignored during rendering. For example if there is sensitive information before or after the Wicket Panel/Border's markup: [something sensitive here 1] wicket:panel [real application code] /wicket:panel [something sensitive here 2] Usually Wicket will render only the [real application code] part but by exploiting this vulnerability an attacker can see also the code with the sensitive information. The application developers are recommended to upgrade to: - Apache Wicket 1.4.23https://wicket.apache.org/2014/02/06/wicket-1.4.23-released.html - Apache Wicket 1.5.11https://wicket.apache.org/2014/02/06/wicket-1.5.11-released.html - Apache Wicket 6.8.0https://wicket.apache.org/2013/05/17/wicket-6.8.0-released.html and/or to remove any sensitive information in the HTML templates. Apache Wicket Team
Strange: Ajax-updates from a form inside a modal dialogue echoed in the page underneath
I've just spent several hours trying to figure out what's going wrong here without any success. I am investigating a very strange effect: In my application I have a search panel in which several dropdowns are used to select search settings. Some of these settings depend on each other, so that they have their change events digested by AjaxFormComponentUpdatingBehavior. Now on a particular page I use a similar form for picking objects using a dialogue in a modal window. For convenience I've extracted the search form to a separate class which is now used in both search panels. Now, when the modal window is opened and the user selects entries from the dropdowns, the ajax updates caused by the above behaviours are echoed to the (still visible) search panel in the underlying page, i.e., selections in its dropdowns change etc. I checked the following things: - there are no hand-assigned markup IDs, i.e. the Ajax updates operate on unique IDs. - when I embed the panel in the page instead of a dialogue, the effect disappears (however this is no option my customer would accept) - using dumb copy-and-paste instead of inheritance for the two search forms does not help, i.e. the effect does not disappear Since the application I'm dealing with is pretty complex, also for confidence reasons, I can't really give any code examples here. I am using Wicket 6.12. Has anyone ever experienced an effect like this? Any workaround known? I feel pretty clueless with this problem.. Cheers, M'bert -- --- / http://herbert.the-little-red-haired-girl.org / - =+= Overflow on /dev/null, please empty the bit bucket. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Visual HTML diff in Wicket?
In my system there is an editorial submodule for creating HTML contents. As I am about to add a versioning history to it, I'd like to add some kind of visualisation of what changed from edit to edit. Does anyone here know of something like a library for this that can be used conveniently in a Wicket-based application? Free would be nice, but commercial (depending on the price, of course) would be an option, too. Cheers, M'bert -- --- / http://herbert.the-little-red-haired-girl.org / - =+= Albert Camus wrote that the only serious question is whether to kill yourself or not. Tom Robbins wrote that the only serious question is whether time has a beginning and an end. Camus clearly got up on the wrong side of bed, and Robbins must have forgotten to set the alarm. -- Tom Robbins - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Strange: Ajax-updates from a form inside a modal dialogue echoed in the page underneath
Hi, Check the Ajax response after selecting a component. It contains ajax-response with component id=... elements. The id attribute is used to find the old HTML element and to replace it with the new content. Since Wicket uses document.getElementByid() to find the old one I see no way how it will replace/update more than one HTML element in the page per component. So I guess there are components for both the elements in the modal and in the page. The best is to debug it and fix it. A workaround is to use a Page for the Modal instead of a Panel. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 10:48 AM, Martin Dietze d...@fh-wedel.de wrote: I've just spent several hours trying to figure out what's going wrong here without any success. I am investigating a very strange effect: In my application I have a search panel in which several dropdowns are used to select search settings. Some of these settings depend on each other, so that they have their change events digested by AjaxFormComponentUpdatingBehavior. Now on a particular page I use a similar form for picking objects using a dialogue in a modal window. For convenience I've extracted the search form to a separate class which is now used in both search panels. Now, when the modal window is opened and the user selects entries from the dropdowns, the ajax updates caused by the above behaviours are echoed to the (still visible) search panel in the underlying page, i.e., selections in its dropdowns change etc. I checked the following things: - there are no hand-assigned markup IDs, i.e. the Ajax updates operate on unique IDs. - when I embed the panel in the page instead of a dialogue, the effect disappears (however this is no option my customer would accept) - using dumb copy-and-paste instead of inheritance for the two search forms does not help, i.e. the effect does not disappear Since the application I'm dealing with is pretty complex, also for confidence reasons, I can't really give any code examples here. I am using Wicket 6.12. Has anyone ever experienced an effect like this? Any workaround known? I feel pretty clueless with this problem.. Cheers, M'bert -- --- / http://herbert.the-little-red-haired-girl.org / - =+= Overflow on /dev/null, please empty the bit bucket. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [REQUEST] Integrate Wicket and Nutch for Google Summer of Code 2014
Hi Martin, On Thu, Feb 6, 2014 at 8:19 AM, Martin Grigorov mgrigo...@apache.orgwrote: I'm glad you contacted us! Thanks for your quick feedback. I see the ticket has been opened for few years now. Yes a bit of history on this one. For the last two years this ticket has been marked for inclusion in GSoC. Last year we *just* missed the deadline and unfortunately the project did not go ahead. However this year we are better prepared and will hopefully have some renewed interest. Nutch could be the next Apache project that uses Wicket for its web administration needs. There are few other projects already. +1 I've added myself as a watcher to the ticket and I will be glad to help with Wicket expertize. If there is any interest in Wicket mailing list about GSOC we will definitely link to your task! Excellent Martin thank you very much. It would be excellent to have a primary mentor from either Nutch or Wicket and the backup vis-a-vis. From the Nutch side, I am personally interested in this issue (and I think there may be one other :)) it would be excellent if you were able to provide Wicket expertise as you mention. Thanks, I look forward to revisiting this thread in due course as (from memory) we find out during February if The ASF has been accepted as a participating organization. Thanks Lewis
replaceWith method in Panel not working with AjaxLazyLoadPanel
Hi, I have the following panel layout: SomeOtherPanel AjaxLazyLoadPanel Panel loading with AjaxLazyLoadPanel PanelToReplace I am trying to replace PanelToReplace using replaceWith within IndicatingAjaxFallbackLink onClick method but I get the message: Component '[EmptyPanel [Component id = additionalInfo]]' with markupid: 'additionalInfo3e' not rendered because it was already removed from page. Using the same approach, I have replaced SomeOtherPanel which is not inside AjaxLazyLoadPanel and it works fine. So it seems I cannot use replaceWith when the Panel is within AjaxLazyLoadPanel. Is there an alternative way to do this? Regards Vishal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: replaceWith method in Panel not working with AjaxLazyLoadPanel
It seems you are adding the old/removed element to the ajax request target. You need to pass the new one instead. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 12:19 PM, Vishal Popat vishal.po...@cipriati.co.ukwrote: Hi, I have the following panel layout: SomeOtherPanel AjaxLazyLoadPanel Panel loading with AjaxLazyLoadPanel PanelToReplace I am trying to replace PanelToReplace using replaceWith within IndicatingAjaxFallbackLink onClick method but I get the message: Component '[EmptyPanel [Component id = additionalInfo]]' with markupid: 'additionalInfo3e' not rendered because it was already removed from page. Using the same approach, I have replaced SomeOtherPanel which is not inside AjaxLazyLoadPanel and it works fine. So it seems I cannot use replaceWith when the Panel is within AjaxLazyLoadPanel. Is there an alternative way to do this? Regards Vishal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: How to add line breaks in the summary text of Wizard properties file
In Wicket 5 it was as easy as using br tags inside summary String. In Wicket 6 this simple way does not work anymore. Why? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-summary-text-of-Wizard-properties-file-tp4660589p4664234.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add line breaks in the summary text of Wizard properties file
See https://issues.apache.org/jira/browse/WICKET-4219 Sven On 02/06/2014 12:51 PM, dpmihai wrote: In Wicket 5 it was as easy as using br tags inside summary String. In Wicket 6 this simple way does not work anymore. Why? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-summary-text-of-Wizard-properties-file-tp4660589p4664234.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Memory leaks best practices
Hello All, Recently we have deployed our project to wicket project to production server. And start getting OutOfMemory PermGenSpace. I believe we have memory leak in our application maybe there is best practices how to deal with Models and JPA entities to resolve this? Thanks in advance -- WBR Maxim aka solomax
Re: Strange: Ajax-updates from a form inside a modal dialogue echoed in the page underneath
Martin, thanks a lot for your advice! On Thu, February 06, 2014, Martin Grigorov wrote: Check the Ajax response after selecting a component. It contains ajax-response with component id=... elements. The id attribute is used to find the old HTML element and to replace it with the new content. Since Wicket uses document.getElementByid() to find the old one I see no way how it will replace/update more than one HTML element in the page per component. So I guess there are components for both the elements in the modal and in the page. The best is to debug it and fix it. A workaround is to use a Page for the Modal instead of a Panel. Using the Ajax Debug panel I could track the problem down rather easily. While the actual form components were clean I found out that their surrounding containers, some of which were, too, updated using Ajax were given fixed markup IDs from within the Java code, so that I had two of them with the same IDs. Need to do a 'git blame' on that one :) Cheers, M'bert -- --- / http://herbert.the-little-red-haired-girl.org / - =+= manche meinen, lechts und rinks kann man nicht velwechsern. werch ein illtum! -- elnst jandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Memory leaks best practices
If you have Models or Components as fields in you classes you should override the classes method onDetach. Example: Public class MyPanel extends Panel { private final IModelObject objectModel; public MyPanel(String id, IModelObject objectModel) { super(id,objectModel); this.objectModel = objectModel; } @Override protected void onDetach() { super.onDetach(); objectModel.detach(); } } Marvin Richter -Original Message- From: Maxim Solodovnik [mailto:solomax...@gmail.com] Sent: Thursday, February 06, 2014 1:09 PM To: users@wicket.apache.org Subject: Memory leaks best practices Hello All, Recently we have deployed our project to wicket project to production server. And start getting OutOfMemory PermGenSpace. I believe we have memory leak in our application maybe there is best practices how to deal with Models and JPA entities to resolve this? Thanks in advance -- WBR Maxim aka solomax
Re: Memory leaks best practices
Probably a class-loading issue: http://stackoverflow.com/questions/88235/dealing-with-java-lang-outofmemoryerror-permgen-space-error Sven On 02/06/2014 01:07 PM, Maxim Solodovnik wrote: Hello All, Recently we have deployed our project to wicket project to production server. And start getting OutOfMemory PermGenSpace. I believe we have memory leak in our application maybe there is best practices how to deal with Models and JPA entities to resolve this? Thanks in advance - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add line breaks in the summary text of Wizard properties file
Thanks. I did the following: @Override public Component getHeader(final String id, final Component parent, final IWizard wizard) { Component c = super.getHeader(id, parent, wizard); c.get(summary).setEscapeModelStrings(false); return c; } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-summary-text-of-Wizard-properties-file-tp4660589p4664241.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Memory leaks best practices
Hi, OOM in PermGen is not what you ask for. If you leak normal memory than the error would be with heap space. PermGen memory is used to keep the Class instances and interned Strings. If you deploy your app for first time then most probably you just need to set the proper initial and max value : -XX:PermSize and -XX:MaxPermSize. Use JConsole to see what size you need. If this error happens on redeploy then most probably you have a ClassLoader memory leak, i.e. you keep references to Class instances and they cannot be released so the PermGen is overloaded. Those are very tricky to be debugged. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 1:07 PM, Maxim Solodovnik solomax...@gmail.comwrote: Hello All, Recently we have deployed our project to wicket project to production server. And start getting OutOfMemory PermGenSpace. I believe we have memory leak in our application maybe there is best practices how to deal with Models and JPA entities to resolve this? Thanks in advance -- WBR Maxim aka solomax
Next Apache Wicket Release
Hi all, You know approximately when Apache Wicket 6.14 will be released? Thanks M -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PMC Member http://people.apache.org/~mdisabatino/
Re: Choice Renderers Display Issue After Submit
I answered my own question! I'm a dork. But, for others that might have this same problem: Because the object in the SearchCriteria bean that you are selecting (selectedPeriod) is now a different type of Object than a String, if you recreate your list of objects to feed to the DropDownChoice (as I do at various parts of the code), you will need to implement a proper EQUALS method in your Object (PeriodBean). Otherwise, your selection connected to the model (selectedPeriod) is not equal to the object sitting in the list of options (because you recreated the list). That means your choice is not shown in the DropDownChoice anymore (it says to Select an Option instead). So, PeriodBean needed this: @Override public boolean equals(final Object obj) { if (obj == this) { return true; } else if (obj == null) { return false; } else if (obj instanceof PeriodBean) { PeriodBean other = (PeriodBean) obj; return other.getPeriodIndex().equals(getPeriodIndex()); } return false; } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Choice-Renderers-Display-Issue-After-Submit-tp4664225p4664237.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Memory leaks best practices
Thanks a lot for quick answers have already added -Xms512M -Xmx2G -Xss1M -XX:PermSize=192m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled Now will add *Model.detach(); to the code and will check the stability (currently application works ~2days before PermGen) Redeployment is performed using Tomcat 7.0.50 restart. Any other ideas are appreciated On Thu, Feb 6, 2014 at 7:28 PM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, OOM in PermGen is not what you ask for. If you leak normal memory than the error would be with heap space. PermGen memory is used to keep the Class instances and interned Strings. If you deploy your app for first time then most probably you just need to set the proper initial and max value : -XX:PermSize and -XX:MaxPermSize. Use JConsole to see what size you need. If this error happens on redeploy then most probably you have a ClassLoader memory leak, i.e. you keep references to Class instances and they cannot be released so the PermGen is overloaded. Those are very tricky to be debugged. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 1:07 PM, Maxim Solodovnik solomax...@gmail.com wrote: Hello All, Recently we have deployed our project to wicket project to production server. And start getting OutOfMemory PermGenSpace. I believe we have memory leak in our application maybe there is best practices how to deal with Models and JPA entities to resolve this? Thanks in advance -- WBR Maxim aka solomax -- WBR Maxim aka solomax
Re: tinymce textarea in a modal window not letting to type
Hi, as the original issue is pretty old, I think nothing has done about it lately. I will open an issue with the quickstart project and try to solve it when I will have some time. I am having this same issue in wicket 6.13.0. Any fixes as of yet? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/tinymce-textarea-in-a-modal-window-not-letting-to-type-tp1886534p4664214.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: replaceWith method in Panel not working with AjaxLazyLoadPanel
This is what I am doing: final Panel emptyPanel = new EmptyPanel(additionalInfo); emptyPanel.setOutputMarkupId(true); item.add(emptyPanel); IndicatingAjaxFallbackLink additionalInfoLink = new IndicatingAjaxFallbackLink(additionalInfoLink) { @Override public void onClick(AjaxRequestTarget target) { MyNewPanel info = new MyNewPanel(emptyPanel.getId()); emptyPanel.replaceWith(info); target.add(emptyPanel); } }; item.add(additionalInfoLink); I think this is correct? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/replaceWith-method-in-Panel-not-working-with-AjaxLazyLoadPanel-tp4664232p4664246.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: replaceWith method in Panel not working with AjaxLazyLoadPanel
On Thu, Feb 6, 2014 at 2:17 PM, vp143 vishal.po...@cipriati.co.uk wrote: This is what I am doing: final Panel emptyPanel = new EmptyPanel(additionalInfo); emptyPanel.setOutputMarkupId(true); item.add(emptyPanel); IndicatingAjaxFallbackLink additionalInfoLink = new IndicatingAjaxFallbackLink(additionalInfoLink) { @Override public void onClick(AjaxRequestTarget target) { MyNewPanel info = new MyNewPanel(emptyPanel.getId()); emptyPanel.replaceWith(info); target.add(emptyPanel); ^^ replace with: target.add(info); } }; item.add(additionalInfoLink); I think this is correct? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/replaceWith-method-in-Panel-not-working-with-AjaxLazyLoadPanel-tp4664232p4664246.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Next Apache Wicket Release
Hi Marco! In a week or two, according to what Martin said. Hi all, You know approximately when Apache Wicket 6.14 will be released? Thanks M - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Next Apache Wicket Release
6.13.0 has been released at Jan 05 ( http://wicket.apache.org/2014/01/05/wicket-6.13.0-released.html) so it is about time for 6.14.0. It depends whether our release manager (Martijn Dashorst) will have time to do this week. As far as I remember Apache Syncope uses 6.14.0-SNAPSHOT at the moment, right ? You don't experience any problems with it ? Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 2:30 PM, Andrea Del Bene an.delb...@gmail.comwrote: Hi Marco! In a week or two, according to what Martin said. Hi all, You know approximately when Apache Wicket 6.14 will be released? Thanks M - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Precondition Check
Args ... I already had this problem some time ago but I can't remember what it was exactly. Wicket Ajax Debug: INFO: Ajax request stopped because of precondition check, url: ./admin?1-5.IBehaviorListener.1-configTypes-panel-dialog-footer-buttons-0-button I have two different Panels with almost the same functionality ... creating a new Object and persist it. One is working fine but the other one not. Works: private Component save(final FormConfigType form) { return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form? f) { Logger log = LoggerFactory.getLogger(EditConfigTypeDialog.class); ConfigManager cm = EjbSupportImpl.getInstance().getConfigManager(); ConfigType configType = form.getModelObject(); if (configType.getId() != null) { try { ConfigType updated = cm.updateConfigType(configType); form.success(Successfully updated the ConfigType.); form.setModelObject(updated); } catch (CcaException ex) { form.error(Failed to update ConfigType); log.error(Failed to update ConfigType, ex); } } else { try { ConfigType created = cm.addConfigType(configType); form.success(Successfully created the ConfigType.); form.setModelObject(created); } catch (CcaException ex) { form.error(Failed to create ConfigType); log.error(Failed to create ConfigType, ex); } } target.add(form); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.add(form); } @Override public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, Save); } }.add(new ButtonBehavior(Buttons.Type.Primary)); } Doesn't work: private Component save(final FormConfigKey form) { return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form? f) { Logger log = LoggerFactory.getLogger(EditConfigKeyDialog.class); ConfigManager cm = EjbSupportImpl.getInstance().getConfigManager(); ConfigKey configKey = form.getModelObject(); if (configKey.getId() != null) { try { ConfigKey updated = cm.updateConfigKey(configKey); form.success(Successfully updated the ConfigKey); form.setModelObject(updated); } catch (CcaException ex) { form.error(Failed to update ConfigKey); log.error(Failed to update ConfigKey, ex); } } else { try { ConfigKey created = cm.addConfigKey(configKey); form.success(Successfully created the ConfigKey); form.setModelObject(created); } catch (CcaException ex) { form.error(Failed to create ConfigKey); log.error(Failed to create ConfigKey, ex); } } target.add(form); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.add(form); } @Override public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, Save); } }.add(new ButtonBehavior(Buttons.Type.Primary)); } I don't see a big difference why the other wouldn't work. You? Marvin Richter Software Developer T +49 (0) 30 69 538 1099 M +49 (0) 174 744 4991 marvin.rich...@jestadigital.commailto:marvin.rich...@jestadigital.com JESTA DIGITAL GmbH Karl-Liebknecht-Str. 32 10178 Berlin, Germany
Re: Next Apache Wicket Release
I was hoping to do something tomorrow afternoon... Unfortunately I wished I was able to complete the migration from our app to 7-snapshot, so I can fix any issues we find prior to a 7-m1... Just have to find the time to perform those actions (I just upgraded myself from full time software engineer to that and part time C.S. teacher-so learning a lot currently and having little time to do extracurricular coding). Martijn On Thu, Feb 6, 2014 at 2:38 PM, Martin Grigorov mgrigo...@apache.orgwrote: 6.13.0 has been released at Jan 05 ( http://wicket.apache.org/2014/01/05/wicket-6.13.0-released.html) so it is about time for 6.14.0. It depends whether our release manager (Martijn Dashorst) will have time to do this week. As far as I remember Apache Syncope uses 6.14.0-SNAPSHOT at the moment, right ? You don't experience any problems with it ? Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 2:30 PM, Andrea Del Bene an.delb...@gmail.com wrote: Hi Marco! In a week or two, according to what Martin said. Hi all, You know approximately when Apache Wicket 6.14 will be released? Thanks M - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com
Re: Precondition Check
Hi, I see you don't have custom AjaxRequestAttributes, so no custom preconditions. Wicket has just one default precondition - it will execute the Ajax call only if the related HTML element (the link) is in the current document. https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=c#L508 Put a breakpoint in Dev Tools/Firebug and see why the link is not in the document. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 2:50 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: Args ... I already had this problem some time ago but I can't remember what it was exactly. Wicket Ajax Debug: INFO: Ajax request stopped because of precondition check, url: ./admin?1-5.IBehaviorListener.1-configTypes-panel-dialog-footer-buttons-0-button I have two different Panels with almost the same functionality ... creating a new Object and persist it. One is working fine but the other one not. Works: private Component save(final FormConfigType form) { return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form? f) { Logger log = LoggerFactory.getLogger(EditConfigTypeDialog.class); ConfigManager cm = EjbSupportImpl.getInstance().getConfigManager(); ConfigType configType = form.getModelObject(); if (configType.getId() != null) { try { ConfigType updated = cm.updateConfigType(configType); form.success(Successfully updated the ConfigType.); form.setModelObject(updated); } catch (CcaException ex) { form.error(Failed to update ConfigType); log.error(Failed to update ConfigType, ex); } } else { try { ConfigType created = cm.addConfigType(configType); form.success(Successfully created the ConfigType.); form.setModelObject(created); } catch (CcaException ex) { form.error(Failed to create ConfigType); log.error(Failed to create ConfigType, ex); } } target.add(form); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.add(form); } @Override public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, Save); } }.add(new ButtonBehavior(Buttons.Type.Primary)); } Doesn't work: private Component save(final FormConfigKey form) { return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form? f) { Logger log = LoggerFactory.getLogger(EditConfigKeyDialog.class); ConfigManager cm = EjbSupportImpl.getInstance().getConfigManager(); ConfigKey configKey = form.getModelObject(); if (configKey.getId() != null) { try { ConfigKey updated = cm.updateConfigKey(configKey); form.success(Successfully updated the ConfigKey); form.setModelObject(updated); } catch (CcaException ex) { form.error(Failed to update ConfigKey); log.error(Failed to update ConfigKey, ex); } } else { try { ConfigKey created = cm.addConfigKey(configKey); form.success(Successfully created the ConfigKey); form.setModelObject(created); } catch (CcaException ex) { form.error(Failed to create ConfigKey); log.error(Failed to create ConfigKey, ex); } } target.add(form); } @Override protected void onError(AjaxRequestTarget target,
Re: Memory leaks best practices
I had the same issue, my problem was doesn't close the database connection! On Thu, Feb 6, 2014 at 8:54 PM, Maxim Solodovnik solomax...@gmail.comwrote: Thanks a lot for quick answers have already added -Xms512M -Xmx2G -Xss1M -XX:PermSize=192m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled Now will add *Model.detach(); to the code and will check the stability (currently application works ~2days before PermGen) Redeployment is performed using Tomcat 7.0.50 restart. Any other ideas are appreciated On Thu, Feb 6, 2014 at 7:28 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, OOM in PermGen is not what you ask for. If you leak normal memory than the error would be with heap space. PermGen memory is used to keep the Class instances and interned Strings. If you deploy your app for first time then most probably you just need to set the proper initial and max value : -XX:PermSize and -XX:MaxPermSize. Use JConsole to see what size you need. If this error happens on redeploy then most probably you have a ClassLoader memory leak, i.e. you keep references to Class instances and they cannot be released so the PermGen is overloaded. Those are very tricky to be debugged. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 1:07 PM, Maxim Solodovnik solomax...@gmail.com wrote: Hello All, Recently we have deployed our project to wicket project to production server. And start getting OutOfMemory PermGenSpace. I believe we have memory leak in our application maybe there is best practices how to deal with Models and JPA entities to resolve this? Thanks in advance -- WBR Maxim aka solomax -- WBR Maxim aka solomax -- --- We do this not because it is easy. We do this because it is hard. --- ShengChe Hsiao --- front...@gmail.com front...@tc.edu.tw --- VoIP : 070-910-2450 ---
RE: Precondition Check
That is the point I don't get ... how can an element doesn't exist in DOM but I can click on it? Marvin Richter -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, February 06, 2014 3:05 PM To: users@wicket.apache.org Subject: Re: Precondition Check Hi, I see you don't have custom AjaxRequestAttributes, so no custom preconditions. Wicket has just one default precondition - it will execute the Ajax call only if the related HTML element (the link) is in the current document. https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=c#L508 Put a breakpoint in Dev Tools/Firebug and see why the link is not in the document. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 2:50 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: Args ... I already had this problem some time ago but I can't remember what it was exactly. Wicket Ajax Debug: INFO: Ajax request stopped because of precondition check, url: ./admin?1-5.IBehaviorListener.1-configTypes-panel-dialog-footer-button s-0-button I have two different Panels with almost the same functionality ... creating a new Object and persist it. One is working fine but the other one not. Works: private Component save(final FormConfigType form) { return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form? f) { Logger log = LoggerFactory.getLogger(EditConfigTypeDialog.class); ConfigManager cm = EjbSupportImpl.getInstance().getConfigManager(); ConfigType configType = form.getModelObject(); if (configType.getId() != null) { try { ConfigType updated = cm.updateConfigType(configType); form.success(Successfully updated the ConfigType.); form.setModelObject(updated); } catch (CcaException ex) { form.error(Failed to update ConfigType); log.error(Failed to update ConfigType, ex); } } else { try { ConfigType created = cm.addConfigType(configType); form.success(Successfully created the ConfigType.); form.setModelObject(created); } catch (CcaException ex) { form.error(Failed to create ConfigType); log.error(Failed to create ConfigType, ex); } } target.add(form); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.add(form); } @Override public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, Save); } }.add(new ButtonBehavior(Buttons.Type.Primary)); } Doesn't work: private Component save(final FormConfigKey form) { return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form? f) { Logger log = LoggerFactory.getLogger(EditConfigKeyDialog.class); ConfigManager cm = EjbSupportImpl.getInstance().getConfigManager(); ConfigKey configKey = form.getModelObject(); if (configKey.getId() != null) { try { ConfigKey updated = cm.updateConfigKey(configKey); form.success(Successfully updated the ConfigKey); form.setModelObject(updated); } catch (CcaException ex) { form.error(Failed to update ConfigKey); log.error(Failed to update ConfigKey, ex); } } else { try { ConfigKey created = cm.addConfigKey(configKey); form.success(Successfully created the ConfigKey); form.setModelObject(created); } catch (CcaException ex) { form.error(Failed to
Re: replaceWith method in Panel not working with AjaxLazyLoadPanel
That was it! Thank you -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/replaceWith-method-in-Panel-not-working-with-AjaxLazyLoadPanel-tp4664232p4664257.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Web Sockets proxying
Hello Martin, I have asked HTTPD mailing thread: http://httpd.markmail.org/thread/zohvqeokryvigpjn It seems to be impossible to set proxy on protocol basis. Maybe it would be possible to do the following: create mapping /ws inside the application make websocket URL to be ws://host:port/app/ws on my home page Thanks in advance On Tue, Jan 28, 2014 at 3:53 PM, Martin Grigorov mgrigo...@apache.orgwrote: Hi Maxim, You should ask in HTTPD mailing lists. Or whoever maintains mod_proxy_wstunnel. If you split http and ws to be in different mappings (e.g. /openmeetings (for http) and /ws-openmeetings (for ws)) then you will have to use two filter elements in your web.xml, one with WicketFilter and another with JettyWebSocketFilter. The problem here is that both of them will have their own Application and Session instances. I think it should be easy for HTTPD to differentiate between the protocols and use the correct proxy settings. If they cannot see the difference in the protocols then they won't see any difference in the url path too :) Please let us know when you have some progress! Martin Grigorov Wicket Training and Consulting On Tue, Jan 28, 2014 at 3:24 AM, Maxim Solodovnik solomax...@gmail.com wrote: Thanks for the quick answer Paul, Segmentation fault is definitely caused by me, but I was not sure if it is compilation issue or bacuse of my configuration. I currently have Apache config like this: #WEBSOCKETS ProxyPass /openmeetings ws://localhost:5080/openmeetings retry=0 ProxyPassReverse /openmeetings ws://localhost:5080/openmeetings retry=0 ProxyPass /openmeetings http://localhost:5080/openmeetings ProxyPassReverse /openmeetings http://localhost:5080/openmeetings As you can see WebSockets mapping is the same as main app mapping (only protocol part differs) I'm afraid segmentation fault might be caused by normal HTML requests coming instead of WebSocket requests This is why I'm asking is there any option to make WebSocket URL differ than main app URL? On Tue, Jan 28, 2014 at 4:27 AM, Paul Bors p...@bors.ws wrote: I don't think segmentation faults fall (no pun intended) under Wicket :) You might want to look for help under the Unbuntu's user mailing lists and/or search on Google. Here's a starting point for you: http://www.amoss.me.uk/2013/06/apache-2-2-websocket-proxying-ubuntu-mod_proxy_wstunnel/ On Mon, Jan 27, 2014 at 12:42 PM, Maxim Solodovnik solomax...@gmail.com wrote: Hello All, Is there any way to perform proxying of web sockets? I have tried mod_proxy_wstunnel but with no luck due to 1) I might compile something to very stable (Segmentation fault under Ubuntu 13.10 HTTP 2.4.6) 2) both main app and ws URL are looks the same: http://localhost/openmeetings and ws://localhost/openmeetings. Should I create additional page/mapping for performing ws tunneling? Maybe anyone can share example config/how to? Thanks in advance :) -- WBR Maxim aka solomax -- WBR Maxim aka solomax -- WBR Maxim aka solomax
Re: Memory leaks best practices
In my case OpenJPA handle DB connection open/close/pooling, so I hope this is not the case. Maybe you can suggest server side memory profiler for Ubuntu server? On Thu, Feb 6, 2014 at 9:12 PM, Shengche Hsiao shengchehs...@gmail.comwrote: I had the same issue, my problem was doesn't close the database connection! On Thu, Feb 6, 2014 at 8:54 PM, Maxim Solodovnik solomax...@gmail.com wrote: Thanks a lot for quick answers have already added -Xms512M -Xmx2G -Xss1M -XX:PermSize=192m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled Now will add *Model.detach(); to the code and will check the stability (currently application works ~2days before PermGen) Redeployment is performed using Tomcat 7.0.50 restart. Any other ideas are appreciated On Thu, Feb 6, 2014 at 7:28 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, OOM in PermGen is not what you ask for. If you leak normal memory than the error would be with heap space. PermGen memory is used to keep the Class instances and interned Strings. If you deploy your app for first time then most probably you just need to set the proper initial and max value : -XX:PermSize and -XX:MaxPermSize. Use JConsole to see what size you need. If this error happens on redeploy then most probably you have a ClassLoader memory leak, i.e. you keep references to Class instances and they cannot be released so the PermGen is overloaded. Those are very tricky to be debugged. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 1:07 PM, Maxim Solodovnik solomax...@gmail.com wrote: Hello All, Recently we have deployed our project to wicket project to production server. And start getting OutOfMemory PermGenSpace. I believe we have memory leak in our application maybe there is best practices how to deal with Models and JPA entities to resolve this? Thanks in advance -- WBR Maxim aka solomax -- WBR Maxim aka solomax -- --- We do this not because it is easy. We do this because it is hard. --- ShengChe Hsiao --- front...@gmail.com front...@tc.edu.tw --- VoIP : 070-910-2450 --- -- WBR Maxim aka solomax
Re: Precondition Check
you can click on it and the event listener can delay the actual Ajax call as much as it wants (Wicket's AjaxChannel.QUEUE does exactly this). E.g. click two times on the link, the first click fires Ajax call (the second click waits), its response removes the link from the DOM (or replaces it), then the second click event will be prevented because its event.target is no more in the DOM Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 3:13 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: That is the point I don't get ... how can an element doesn't exist in DOM but I can click on it? Marvin Richter -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, February 06, 2014 3:05 PM To: users@wicket.apache.org Subject: Re: Precondition Check Hi, I see you don't have custom AjaxRequestAttributes, so no custom preconditions. Wicket has just one default precondition - it will execute the Ajax call only if the related HTML element (the link) is in the current document. https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=c#L508 Put a breakpoint in Dev Tools/Firebug and see why the link is not in the document. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 2:50 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: Args ... I already had this problem some time ago but I can't remember what it was exactly. Wicket Ajax Debug: INFO: Ajax request stopped because of precondition check, url: ./admin?1-5.IBehaviorListener.1-configTypes-panel-dialog-footer-button s-0-button I have two different Panels with almost the same functionality ... creating a new Object and persist it. One is working fine but the other one not. Works: private Component save(final FormConfigType form) { return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form? f) { Logger log = LoggerFactory.getLogger(EditConfigTypeDialog.class); ConfigManager cm = EjbSupportImpl.getInstance().getConfigManager(); ConfigType configType = form.getModelObject(); if (configType.getId() != null) { try { ConfigType updated = cm.updateConfigType(configType); form.success(Successfully updated the ConfigType.); form.setModelObject(updated); } catch (CcaException ex) { form.error(Failed to update ConfigType); log.error(Failed to update ConfigType, ex); } } else { try { ConfigType created = cm.addConfigType(configType); form.success(Successfully created the ConfigType.); form.setModelObject(created); } catch (CcaException ex) { form.error(Failed to create ConfigType); log.error(Failed to create ConfigType, ex); } } target.add(form); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.add(form); } @Override public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, Save); } }.add(new ButtonBehavior(Buttons.Type.Primary)); } Doesn't work: private Component save(final FormConfigKey form) { return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form? f) { Logger log = LoggerFactory.getLogger(EditConfigKeyDialog.class); ConfigManager cm = EjbSupportImpl.getInstance().getConfigManager(); ConfigKey configKey = form.getModelObject(); if (configKey.getId() != null) { try { ConfigKey updated = cm.updateConfigKey(configKey); form.success(Successfully updated the ConfigKey); form.setModelObject(updated); }
Re: Memory leaks best practices
The best memory profiler is Eclipse MAT - https://www.eclipse.org/mat/ But again it helps only with debugging problems in the heap, not in the perm gen Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 3:18 PM, Maxim Solodovnik solomax...@gmail.comwrote: In my case OpenJPA handle DB connection open/close/pooling, so I hope this is not the case. Maybe you can suggest server side memory profiler for Ubuntu server? On Thu, Feb 6, 2014 at 9:12 PM, Shengche Hsiao shengchehs...@gmail.com wrote: I had the same issue, my problem was doesn't close the database connection! On Thu, Feb 6, 2014 at 8:54 PM, Maxim Solodovnik solomax...@gmail.com wrote: Thanks a lot for quick answers have already added -Xms512M -Xmx2G -Xss1M -XX:PermSize=192m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled Now will add *Model.detach(); to the code and will check the stability (currently application works ~2days before PermGen) Redeployment is performed using Tomcat 7.0.50 restart. Any other ideas are appreciated On Thu, Feb 6, 2014 at 7:28 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, OOM in PermGen is not what you ask for. If you leak normal memory than the error would be with heap space. PermGen memory is used to keep the Class instances and interned Strings. If you deploy your app for first time then most probably you just need to set the proper initial and max value : -XX:PermSize and -XX:MaxPermSize. Use JConsole to see what size you need. If this error happens on redeploy then most probably you have a ClassLoader memory leak, i.e. you keep references to Class instances and they cannot be released so the PermGen is overloaded. Those are very tricky to be debugged. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 1:07 PM, Maxim Solodovnik solomax...@gmail.com wrote: Hello All, Recently we have deployed our project to wicket project to production server. And start getting OutOfMemory PermGenSpace. I believe we have memory leak in our application maybe there is best practices how to deal with Models and JPA entities to resolve this? Thanks in advance -- WBR Maxim aka solomax -- WBR Maxim aka solomax -- --- We do this not because it is easy. We do this because it is hard. --- ShengChe Hsiao --- front...@gmail.com front...@tc.edu.tw --- VoIP : 070-910-2450 --- -- WBR Maxim aka solomax
Re: Memory leaks best practices
http://www.yourkit.com/docs/kb/class_loaders.jsp François On Thu, Feb 6, 2014 at 3:22 PM, Martin Grigorov mgrigo...@apache.orgwrote: The best memory profiler is Eclipse MAT - https://www.eclipse.org/mat/ But again it helps only with debugging problems in the heap, not in the perm gen Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 3:18 PM, Maxim Solodovnik solomax...@gmail.com wrote: In my case OpenJPA handle DB connection open/close/pooling, so I hope this is not the case. Maybe you can suggest server side memory profiler for Ubuntu server? On Thu, Feb 6, 2014 at 9:12 PM, Shengche Hsiao shengchehs...@gmail.com wrote: I had the same issue, my problem was doesn't close the database connection! On Thu, Feb 6, 2014 at 8:54 PM, Maxim Solodovnik solomax...@gmail.com wrote: Thanks a lot for quick answers have already added -Xms512M -Xmx2G -Xss1M -XX:PermSize=192m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled Now will add *Model.detach(); to the code and will check the stability (currently application works ~2days before PermGen) Redeployment is performed using Tomcat 7.0.50 restart. Any other ideas are appreciated On Thu, Feb 6, 2014 at 7:28 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, OOM in PermGen is not what you ask for. If you leak normal memory than the error would be with heap space. PermGen memory is used to keep the Class instances and interned Strings. If you deploy your app for first time then most probably you just need to set the proper initial and max value : -XX:PermSize and -XX:MaxPermSize. Use JConsole to see what size you need. If this error happens on redeploy then most probably you have a ClassLoader memory leak, i.e. you keep references to Class instances and they cannot be released so the PermGen is overloaded. Those are very tricky to be debugged. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 1:07 PM, Maxim Solodovnik solomax...@gmail.com wrote: Hello All, Recently we have deployed our project to wicket project to production server. And start getting OutOfMemory PermGenSpace. I believe we have memory leak in our application maybe there is best practices how to deal with Models and JPA entities to resolve this? Thanks in advance -- WBR Maxim aka solomax -- WBR Maxim aka solomax -- --- We do this not because it is easy. We do this because it is hard. --- ShengChe Hsiao --- front...@gmail.com front...@tc.edu.tw --- VoIP : 070-910-2450 --- -- WBR Maxim aka solomax
Wicket 6 datatable pagination
Hello all. I'm facing a strange problem. If i use 1.5.11 version of wicket, pagination works as designed. I can traverse through all pages of the table and sorting works too. If i switch to 6.13.0 method public IteratorContact iterator(long first, long count) of my SortingDataProvider class always returns first with value of zero. Do i have to do something extra in v.6? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-datatable-pagination-tp4664262.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Web Sockets proxying
Hi Maxim, It is shame that none of the HTTPD developers responded. It looks Eric Covener knows as much as I do about mod_proxy_wstunnel ... If it wasn't possible to make the difference between the protocols then the web server won't be able to decide whether to use WebSocket endpoint or http servlet/filter to call the application code. Sorry that I cannot help you more. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 3:17 PM, Maxim Solodovnik solomax...@gmail.comwrote: Hello Martin, I have asked HTTPD mailing thread: http://httpd.markmail.org/thread/zohvqeokryvigpjn It seems to be impossible to set proxy on protocol basis. Maybe it would be possible to do the following: create mapping /ws inside the application make websocket URL to be ws://host:port/app/ws on my home page Thanks in advance On Tue, Jan 28, 2014 at 3:53 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi Maxim, You should ask in HTTPD mailing lists. Or whoever maintains mod_proxy_wstunnel. If you split http and ws to be in different mappings (e.g. /openmeetings (for http) and /ws-openmeetings (for ws)) then you will have to use two filter elements in your web.xml, one with WicketFilter and another with JettyWebSocketFilter. The problem here is that both of them will have their own Application and Session instances. I think it should be easy for HTTPD to differentiate between the protocols and use the correct proxy settings. If they cannot see the difference in the protocols then they won't see any difference in the url path too :) Please let us know when you have some progress! Martin Grigorov Wicket Training and Consulting On Tue, Jan 28, 2014 at 3:24 AM, Maxim Solodovnik solomax...@gmail.com wrote: Thanks for the quick answer Paul, Segmentation fault is definitely caused by me, but I was not sure if it is compilation issue or bacuse of my configuration. I currently have Apache config like this: #WEBSOCKETS ProxyPass /openmeetings ws://localhost:5080/openmeetings retry=0 ProxyPassReverse /openmeetings ws://localhost:5080/openmeetings retry=0 ProxyPass /openmeetings http://localhost:5080/openmeetings ProxyPassReverse /openmeetings http://localhost:5080/openmeetings As you can see WebSockets mapping is the same as main app mapping (only protocol part differs) I'm afraid segmentation fault might be caused by normal HTML requests coming instead of WebSocket requests This is why I'm asking is there any option to make WebSocket URL differ than main app URL? On Tue, Jan 28, 2014 at 4:27 AM, Paul Bors p...@bors.ws wrote: I don't think segmentation faults fall (no pun intended) under Wicket :) You might want to look for help under the Unbuntu's user mailing lists and/or search on Google. Here's a starting point for you: http://www.amoss.me.uk/2013/06/apache-2-2-websocket-proxying-ubuntu-mod_proxy_wstunnel/ On Mon, Jan 27, 2014 at 12:42 PM, Maxim Solodovnik solomax...@gmail.com wrote: Hello All, Is there any way to perform proxying of web sockets? I have tried mod_proxy_wstunnel but with no luck due to 1) I might compile something to very stable (Segmentation fault under Ubuntu 13.10 HTTP 2.4.6) 2) both main app and ws URL are looks the same: http://localhost/openmeetings and ws://localhost/openmeetings. Should I create additional page/mapping for performing ws tunneling? Maybe anyone can share example config/how to? Thanks in advance :) -- WBR Maxim aka solomax -- WBR Maxim aka solomax -- WBR Maxim aka solomax
RE: Precondition Check
Ok, that would be a valid scenario where that makes sense but that's not the case. But I found the problem: Because of the the childing of my panels the one that was not working was inside a form tag but this panel also contains a form. As of the HTML specification it is not allowed to nest forms ... Chrome and FF are so failure tolerant that while rendering they just ignore it. But the Submit will not work anymore ... Marvin Richter Software Developer T +49 (0) 30 69 538 1099 M +49 (0) 174 744 4991 marvin.rich...@jestadigital.com JESTA DIGITAL GmbH Karl-Liebknecht-Str. 32 10178 Berlin, Germany Gesellschaft mit beschränkter Haftung mit Sitz in Berlin HRB Nr. 97990 Amtsgericht Charlottenburg Geschäftsführer: Markus Peuler -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, February 06, 2014 3:22 PM To: users@wicket.apache.org Subject: Re: Precondition Check you can click on it and the event listener can delay the actual Ajax call as much as it wants (Wicket's AjaxChannel.QUEUE does exactly this). E.g. click two times on the link, the first click fires Ajax call (the second click waits), its response removes the link from the DOM (or replaces it), then the second click event will be prevented because its event.target is no more in the DOM Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 3:13 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: That is the point I don't get ... how can an element doesn't exist in DOM but I can click on it? Marvin Richter -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, February 06, 2014 3:05 PM To: users@wicket.apache.org Subject: Re: Precondition Check Hi, I see you don't have custom AjaxRequestAttributes, so no custom preconditions. Wicket has just one default precondition - it will execute the Ajax call only if the related HTML element (the link) is in the current document. https://github.com/apache/wicket/blob/master/wicket-core/src/main/java /org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=c#L508 Put a breakpoint in Dev Tools/Firebug and see why the link is not in the document. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 2:50 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: Args ... I already had this problem some time ago but I can't remember what it was exactly. Wicket Ajax Debug: INFO: Ajax request stopped because of precondition check, url: ./admin?1-5.IBehaviorListener.1-configTypes-panel-dialog-footer-butt on s-0-button I have two different Panels with almost the same functionality ... creating a new Object and persist it. One is working fine but the other one not. Works: private Component save(final FormConfigType form) { return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form? f) { Logger log = LoggerFactory.getLogger(EditConfigTypeDialog.class); ConfigManager cm = EjbSupportImpl.getInstance().getConfigManager(); ConfigType configType = form.getModelObject(); if (configType.getId() != null) { try { ConfigType updated = cm.updateConfigType(configType); form.success(Successfully updated the ConfigType.); form.setModelObject(updated); } catch (CcaException ex) { form.error(Failed to update ConfigType); log.error(Failed to update ConfigType, ex); } } else { try { ConfigType created = cm.addConfigType(configType); form.success(Successfully created the ConfigType.); form.setModelObject(created); } catch (CcaException ex) { form.error(Failed to create ConfigType); log.error(Failed to create ConfigType, ex); } } target.add(form); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.add(form); } @Override public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, Save);
Re: Precondition Check
So the check fails here https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=c#L511 the form is not there ... Thanks for sharing! Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 3:35 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: Ok, that would be a valid scenario where that makes sense but that's not the case. But I found the problem: Because of the the childing of my panels the one that was not working was inside a form tag but this panel also contains a form. As of the HTML specification it is not allowed to nest forms ... Chrome and FF are so failure tolerant that while rendering they just ignore it. But the Submit will not work anymore ... Marvin Richter Software Developer T +49 (0) 30 69 538 1099 M +49 (0) 174 744 4991 marvin.rich...@jestadigital.com JESTA DIGITAL GmbH Karl-Liebknecht-Str. 32 10178 Berlin, Germany Gesellschaft mit beschränkter Haftung mit Sitz in Berlin HRB Nr. 97990 Amtsgericht Charlottenburg Geschäftsführer: Markus Peuler -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, February 06, 2014 3:22 PM To: users@wicket.apache.org Subject: Re: Precondition Check you can click on it and the event listener can delay the actual Ajax call as much as it wants (Wicket's AjaxChannel.QUEUE does exactly this). E.g. click two times on the link, the first click fires Ajax call (the second click waits), its response removes the link from the DOM (or replaces it), then the second click event will be prevented because its event.target is no more in the DOM Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 3:13 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: That is the point I don't get ... how can an element doesn't exist in DOM but I can click on it? Marvin Richter -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, February 06, 2014 3:05 PM To: users@wicket.apache.org Subject: Re: Precondition Check Hi, I see you don't have custom AjaxRequestAttributes, so no custom preconditions. Wicket has just one default precondition - it will execute the Ajax call only if the related HTML element (the link) is in the current document. https://github.com/apache/wicket/blob/master/wicket-core/src/main/java /org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=c#L508 Put a breakpoint in Dev Tools/Firebug and see why the link is not in the document. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 2:50 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: Args ... I already had this problem some time ago but I can't remember what it was exactly. Wicket Ajax Debug: INFO: Ajax request stopped because of precondition check, url: ./admin?1-5.IBehaviorListener.1-configTypes-panel-dialog-footer-butt on s-0-button I have two different Panels with almost the same functionality ... creating a new Object and persist it. One is working fine but the other one not. Works: private Component save(final FormConfigType form) { return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form? f) { Logger log = LoggerFactory.getLogger(EditConfigTypeDialog.class); ConfigManager cm = EjbSupportImpl.getInstance().getConfigManager(); ConfigType configType = form.getModelObject(); if (configType.getId() != null) { try { ConfigType updated = cm.updateConfigType(configType); form.success(Successfully updated the ConfigType.); form.setModelObject(updated); } catch (CcaException ex) { form.error(Failed to update ConfigType); log.error(Failed to update ConfigType, ex); } } else { try { ConfigType created = cm.addConfigType(configType); form.success(Successfully created the ConfigType.); form.setModelObject(created); } catch (CcaException ex) { form.error(Failed to create ConfigType); log.error(Failed to create ConfigType, ex); } } target.add(form);
RE: Precondition Check
No problem ... I have to thank you, you pointed me in the right direction. Finding such DOM problems while the Browser renders them just fine and even calling JQuery selector on console returns the element can be pain in the ass ... Marvin Richter -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, February 06, 2014 3:40 PM To: users@wicket.apache.org Subject: Re: Precondition Check So the check fails here https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=c#L511 the form is not there ... Thanks for sharing! Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 3:35 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: Ok, that would be a valid scenario where that makes sense but that's not the case. But I found the problem: Because of the the childing of my panels the one that was not working was inside a form tag but this panel also contains a form. As of the HTML specification it is not allowed to nest forms ... Chrome and FF are so failure tolerant that while rendering they just ignore it. But the Submit will not work anymore ... Marvin Richter Software Developer T +49 (0) 30 69 538 1099 M +49 (0) 174 744 4991 marvin.rich...@jestadigital.com JESTA DIGITAL GmbH Karl-Liebknecht-Str. 32 10178 Berlin, Germany Gesellschaft mit beschränkter Haftung mit Sitz in Berlin HRB Nr. 97990 Amtsgericht Charlottenburg Geschäftsführer: Markus Peuler -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, February 06, 2014 3:22 PM To: users@wicket.apache.org Subject: Re: Precondition Check you can click on it and the event listener can delay the actual Ajax call as much as it wants (Wicket's AjaxChannel.QUEUE does exactly this). E.g. click two times on the link, the first click fires Ajax call (the second click waits), its response removes the link from the DOM (or replaces it), then the second click event will be prevented because its event.target is no more in the DOM Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 3:13 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: That is the point I don't get ... how can an element doesn't exist in DOM but I can click on it? Marvin Richter -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, February 06, 2014 3:05 PM To: users@wicket.apache.org Subject: Re: Precondition Check Hi, I see you don't have custom AjaxRequestAttributes, so no custom preconditions. Wicket has just one default precondition - it will execute the Ajax call only if the related HTML element (the link) is in the current document. https://github.com/apache/wicket/blob/master/wicket-core/src/main/ja va /org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=c#L508 Put a breakpoint in Dev Tools/Firebug and see why the link is not in the document. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 2:50 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: Args ... I already had this problem some time ago but I can't remember what it was exactly. Wicket Ajax Debug: INFO: Ajax request stopped because of precondition check, url: ./admin?1-5.IBehaviorListener.1-configTypes-panel-dialog-footer-bu tt on s-0-button I have two different Panels with almost the same functionality ... creating a new Object and persist it. One is working fine but the other one not. Works: private Component save(final FormConfigType form) { return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form? f) { Logger log = LoggerFactory.getLogger(EditConfigTypeDialog.class); ConfigManager cm = EjbSupportImpl.getInstance().getConfigManager(); ConfigType configType = form.getModelObject(); if (configType.getId() != null) { try { ConfigType updated = cm.updateConfigType(configType); form.success(Successfully updated the ConfigType.); form.setModelObject(updated); } catch (CcaException ex) { form.error(Failed to update ConfigType); log.error(Failed to update ConfigType, ex); } } else { try { ConfigType created = cm.addConfigType(configType);
Datepicker to pick just the month
Hi, I am developing a webapp where at some certain point we need to pick just the month of a date. I have tried to create a DatePicker with date format = , and it works ok when it loads the date from the Database, if the month of the date stored is february, for example, it renders February correct, but if I try to pick another month, for example March, then in the date field it shows 03 and it shows an error pointing that the date format is not correct. Isn't it allowed to use the format? MMM doesn't work either... Thanks!
Re: Wicket 6 datatable pagination
OK found it. after trying with many versions it seems that it is a 6.13.0 bug, because in 6.12.0 pagination works w/o probs -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-datatable-pagination-tp4664262p4664263.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Next Apache Wicket Release
Hi, Il giorno 06/feb/2014, alle ore 14:38, Martin Grigorov mgrigo...@apache.org ha scritto: 6.13.0 has been released at Jan 05 ( http://wicket.apache.org/2014/01/05/wicket-6.13.0-released.html) so it is about time for 6.14.0. It depends whether our release manager (Martijn Dashorst) will have time to do this week. As far as I remember Apache Syncope uses 6.14.0-SNAPSHOT at the moment, right ? You don't experience any problems with it ? No problems with 6.14.0-SNAPSHOT. Thanks M Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 2:30 PM, Andrea Del Bene an.delb...@gmail.comwrote: Hi Marco! In a week or two, according to what Martin said. Hi all, You know approximately when Apache Wicket 6.14 will be released? Thanks M - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PMC Member http://people.apache.org/~mdisabatino/
Re: Datepicker to pick just the month
Hi, I assume you use wicket-datetime module. You will have to consult with YUI 2.x docs to see what is supported - http://yui.github.io/yui2/ https://github.com/l0rdn1kk0n/wicket-bootstrap uses this datepicker - http://bootstrap-datepicker.readthedocs.org/en/latest/options.html#format Wicket JQuery UI project provides integration with JQuery UI datepicker. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 3:46 PM, María del Busto Griñón maria.delbu...@gmail.com wrote: Hi, I am developing a webapp where at some certain point we need to pick just the month of a date. I have tried to create a DatePicker with date format = , and it works ok when it loads the date from the Database, if the month of the date stored is february, for example, it renders February correct, but if I try to pick another month, for example March, then in the date field it shows 03 and it shows an error pointing that the date format is not correct. Isn't it allowed to use the format? MMM doesn't work either... Thanks!
Re: Wicket 6 datatable pagination
We are not aware of such issue. Please create a quickstart and attach it to ticket in JIRA. Thanks! Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 3:51 PM, djapal dja...@gmail.com wrote: OK found it. after trying with many versions it seems that it is a 6.13.0 bug, because in 6.12.0 pagination works w/o probs -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-datatable-pagination-tp4664262p4664263.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
I need a library for drawing graph
Hi everyone!, I need js or embedded js to wicket library for drawing graph (math) network.
Re: I need a library for drawing graph
I'm using jsplumb with wicket. There is not a lot of interaction between the two but the clean separation of concerns afforded by wicket's design makes using JS libraries like this very easy. On Thu, Feb 6, 2014 at 10:24 AM, Farrukh SATTOROV fireda...@gmail.comwrote: Hi everyone!, I need js or embedded js to wicket library for drawing graph (math) network.
Re: I need a library for drawing graph
Thank you On Thu, Feb 6, 2014 at 8:40 PM, Duane Searsmith dsearsm...@gmail.comwrote: I'm using jsplumb with wicket. There is not a lot of interaction between the two but the clean separation of concerns afforded by wicket's design makes using JS libraries like this very easy. On Thu, Feb 6, 2014 at 10:24 AM, Farrukh SATTOROV fireda...@gmail.com wrote: Hi everyone!, I need js or embedded js to wicket library for drawing graph (math) network. -- С уважением и наилучшими пожеланиями *Фаррух*
Re: I need a library for drawing graph
Hi, arbor.js is a really nice library based on jQuery. I don't know if it can suit your need. http://arborjs.org/ I am not aware of an existing wicket integration but it should be feasible... There is several jQuery / Wicket integrations (boostrap, jquery-ui, etc) you can look at for inspiration... Best regards, Sebastien. On Thu, Feb 6, 2014 at 5:44 PM, Farrukh SATTOROV fireda...@gmail.comwrote: Thank you On Thu, Feb 6, 2014 at 8:40 PM, Duane Searsmith dsearsm...@gmail.com wrote: I'm using jsplumb with wicket. There is not a lot of interaction between the two but the clean separation of concerns afforded by wicket's design makes using JS libraries like this very easy. On Thu, Feb 6, 2014 at 10:24 AM, Farrukh SATTOROV fireda...@gmail.com wrote: Hi everyone!, I need js or embedded js to wicket library for drawing graph (math) network. -- С уважением и наилучшими пожеланиями *Фаррух*
Re: I need a library for drawing graph
Here is another JavaScript solution - http://sigmajs.org/ Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 5:44 PM, Farrukh SATTOROV fireda...@gmail.comwrote: Thank you On Thu, Feb 6, 2014 at 8:40 PM, Duane Searsmith dsearsm...@gmail.com wrote: I'm using jsplumb with wicket. There is not a lot of interaction between the two but the clean separation of concerns afforded by wicket's design makes using JS libraries like this very easy. On Thu, Feb 6, 2014 at 10:24 AM, Farrukh SATTOROV fireda...@gmail.com wrote: Hi everyone!, I need js or embedded js to wicket library for drawing graph (math) network. -- С уважением и наилучшими пожеланиями *Фаррух*
Re: Visual HTML diff in Wicket?
On 02/06/14 10:53, Martin Dietze wrote: In my system there is an editorial submodule for creating HTML contents. As I am about to add a versioning history to it, I'd like to add some kind of visualisation of what changed from edit to edit. Does anyone here know of something like a library for this that can be used conveniently in a Wicket-based application? Free would be nice, but commercial (depending on the price, of course) would be an option, too. We've used google-diff-match-patch with success. http://code.google.com/p/google-diff-match-patch/ It's not on Maven Central, though. (That's an issue in the issue tracker, sind March 2011...) There is a Maven repo structure in their SVN repos, but without proper release support. sksamuel forked it for that reason and uploaded it to Maven Central: https://github.com/sksamuel/diffpatch HTH, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jsch...@acm.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [REQUEST] Integrate Wicket and Nutch for Google Summer of Code 2014
Thanks Guys. I created the original ticket and am a huge Wicket fanboy :) We used it all over OODT and rewrote a bunch of our web apps in it. I'm happy to help here too. Cheers, Chris -Original Message- From: Martin Grigorov mgrigo...@apache.org Reply-To: d...@nutch.apache.org d...@nutch.apache.org Date: Thursday, February 6, 2014 12:19 AM To: lewis.mcgibb...@gmail.com lewis.mcgibb...@gmail.com Cc: d...@nutch.apache.org d...@nutch.apache.org, users@wicket.apache.org users@wicket.apache.org, d...@wicket.apache.org d...@wicket.apache.org Subject: Re: [REQUEST] Integrate Wicket and Nutch for Google Summer of Code 2014 Hi Lewis, I'm glad you contacted us! I see the ticket has been opened for few years now. This is a shame! We should have coordinated this task much earlier! Nutch could be the next Apache project that uses Wicket for its web administration needs. There are few other projects already. I've added myself as a watcher to the ticket and I will be glad to help with Wicket expertize. If there is any interest in Wicket mailing list about GSOC we will definitely link to your task! Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 1:59 AM, Lewis John Mcgibbney lewis.mcgibb...@gmail.com wrote: Hi dev@, My name is Lewis, I am a committer over on Apache Nutch. I'm writing to the dev@ list in an attempt to interest students in participating in this years GSoC. The idea is to create a Wicket-based Web Application for Nutch as a GSoC project. For those that might be interested the project idea can be seen here [0]. I would very much appreciate if any potential students could be forwarded my details or guided towards d...@nutch.apache.org so we can gather interest in the project. I would also like to write to the user@ list regarding this topic. Thank you in advance Lewis [0] https://issues.apache.org/jira/browse/NUTCH-841 -- *Lewis* - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
replaceWith method in Panel not working with AjaxLazyLoadPanel
Hi, I have the following panel layout: SomeOtherPanel AjaxLazyLoadPanel Panel loading with AjaxLazyLoadPanel PanelToReplace I am trying to replace PanelToReplace using replaceWith within IndicatingAjaxFallbackLink onClick method but I get the message: Component '[EmptyPanel [Component id = additionalInfo]]' with markupid: 'additionalInfo3e' not rendered because it was already removed from page. Using the same approach, I have replaced SomeOtherPanel which is not inside AjaxLazyLoadPanel and it works fine. So it seems I cannot use replaceWith when the Panel is within AjaxLazyLoadPanel. Is there an alternative way to do this? Regards Vishal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Choice Renderers Display Issue After Submit
Hi guys! I'm using a ChoiceRenderer for the first time, and am having a slight problem with it. Any help would be *greatly* appreciated! I have a DropDownChoice used to select a particular PeriodBean object which uses a ChoiceRenderer to properly display only the Description string of the object. The issue is that once a selection is made and I submit the form (works properly), the DropDownChoice goes back to not having a selection displayed (because, I'm assuming, it doesn't know how to take the item in the property model and display it in the DropDownChoice). How do I make it continue to properly display the selected PeriodBean Description? Here's code (simplified version of mine): // This is what a PeriodBean looks like: public class PeriodBean implements Serializable { private String periodIndex; private String periodDescription; public String getPeriodIndex() { return periodIndex; } public void setPeriodIndex(String periodIndex) { this.periodIndex = periodIndex; } public String getPeriodDescription() { return periodDescription; } public void setPeriodDescription(String periodDescription) { this.periodDescription = periodDescription; } } // This is what my SearchCriteriaBean looks like (stores the selected value from the dropdown): public class SearchCriteriaBean implements Serializable { private PeriodBean selectedPeriod; public PeriodBean getSelectedPeriod() { return performancePeriod; } public void setSelectedPeriod(PeriodBean periodBean ) { this.selectedPeriod= periodBean; } } // This is a PeriodList item that creates the list of acceptable choices for my dropdown public class PeriodList extends AbstractReadOnlyModelListlt;? extends PeriodBean { public PeriodList() { super(); } @Override public ListPeriodBean getObject() { ListPeriodBean pendings = new ArrayListPeriodBean(); // Go to the database and do some stuff to get the proper list of selectable pending periods return pendingPeriods; } public IteratorPeriodBean iterator() { ListPeriodBean pendings = this.getObject(); return pendings.iterator(); } }; // And this is JAVA in the Page itself: // Create a search criteria SearchCriteriaBean searchCriteria = new SearchCriteriaBean(); //Defined above // Create a list PeriodList periodChoices = new PeriodList(); //Defined above // Create my dropdown and choice renderer to display the period description ChoiceRendererPeriodBean choiceRenderer = new ChoiceRendererPeriodBean( periodDescription, periodIndex); DropDownChoicePeriodBean periodChoice = new DropDownChoicePeriodBean( periodChoice, new PropertyModelPeriodBean(searchCriteria, selectedPeriod), periodChoices, choiceRenderer); periodChoice.setOutputMarkupId(true); periodChoice.setRequired(true); form.add(periodChoice); // There is a form on this page but I am not showing for simplicity. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Choice-Renderers-Display-Issue-After-Submit-tp4664225.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Visual HTML diff in Wicket?
You could try https://github.com/alkacon/alkacon-diff Stephan Am 06.02.2014 um 10:53 schrieb Martin Dietze d...@fh-wedel.de: In my system there is an editorial submodule for creating HTML contents. As I am about to add a versioning history to it, I'd like to add some kind of visualisation of what changed from edit to edit. Does anyone here know of something like a library for this that can be used conveniently in a Wicket-based application? Free would be nice, but commercial (depending on the price, of course) would be an option, too. Cheers, M'bert -- --- / http://herbert.the-little-red-haired-girl.org / - =+= Albert Camus wrote that the only serious question is whether to kill yourself or not. Tom Robbins wrote that the only serious question is whether time has a beginning and an end. Camus clearly got up on the wrong side of bed, and Robbins must have forgotten to set the alarm. -- Tom Robbins - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org