Re: Wicket6 setResponsePage() stackoverflow error.
Hi, See http://stackoverflow.com/a/25147003 Do you know which version of Tomcat is in use behind the scenes ? Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Nov 25, 2014 at 9:01 AM, Milind m.gaw...@maxxton.com wrote: some part of web.xml as: filter filter-nameMyPortlet/filter-name filter-class org.apache.wicket.portlet.PortletFilter /filter-class init-param param-nameapplicationClassName/param-name param-value test.portlet.myportlet.WicketApplication /param-value /init-param /filter filter-mapping filter-nameMyPortlet/filter-name url-pattern/MyPortlet/*/url-pattern dispatcherREQUEST/dispatcher dispatcherFORWARD/dispatcher dispatcherINCLUDE/dispatcher /filter-mapping -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket6-setResponsePage-stackoverflow-error-tp4668538p4668541.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: Wicket6 setResponsePage() stackoverflow error.
Hi Martin, I am using tomcat-7.0.42, tested the same with tomcat-7.0.47/54/57 too still same issue happened. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket6-setResponsePage-stackoverflow-error-tp4668538p4668543.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: Wicket6 setResponsePage() stackoverflow error.
I'd suggest to ask in Tomcat users@ mailing list. The weird cycle is in their code. https://issues.apache.org/bugzilla/show_bug.cgi?id=56339#c4 says it should have been fixed in 7.0.54. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Nov 25, 2014 at 10:29 AM, Milind m.gaw...@maxxton.com wrote: Hi Martin, I am using tomcat-7.0.42, tested the same with tomcat-7.0.47/54/57 too still same issue happened. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket6-setResponsePage-stackoverflow-error-tp4668538p4668543.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: IComponentOnBeforeRenderListener and ListView
Hi, On Mon, Nov 24, 2014 at 10:34 PM, mscoon msc...@gmail.com wrote: Martin, I'll try once again to explain my problem and if it's still unclear I'll make the quickstart. What you say is right, the sequence of events is as you said. My problem is that everything happens in AbstractRepeater#onBeforeRender(). So I have to put my code attachValidationErrors either before or after AbstractRepeater#onBeforeRender(). If I put it before, the form components have not yet been created (onPopulate() has not yet been called). If I put it after, the componentPostOnBeforeRenderListeners have already run so the ErrorDecorator thinks there are no errors. What I need is a way for my code to run *after* onPopulate() but *before* onBeforeRenderChildren(). There is no such hook though. Let me also expand my pseudocode a bit in case this helps: class MyPage extends WebPage { pyblic MyPage() { Form form = new Form(form, model) { override onBeforeRender() { attachValidationErrors(); Why do you need to call that here at all ? Why you want to traverse the sub-tree manually ? By using IComponentOnBeforeRenderListener you are being notified for each and every Component in the component tree. So your listener should just check whether the component is an instance of FormComponent and if its name matches (and the other complex logic you have) then report the error. onBeforeRender(); } }; add(form); ListView list = new ListView(list, model2) { public populateItem(ListItem listItem) { add(new TextField(name, new PropertyModel(model2, name))); } } form.add(list); } void attachValidationErrors() { form.visitChildren(FormComponent.class, new IVisitorFormComponent,Void() { void component(FormComponent? obj, IVisitVoid visit) { if (obj.getId().equals(name) /* and some other complex logic here */) { obj.error(Please provide a name); } } }); } I think this makes my problem quite evident. I can't find the right place to put the call to attachValidationErrors(). Or perhaps I need a different implements for FormErrorDecorator. On Mon, Nov 24, 2014 at 5:13 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Maybe I miss something from your description but I think ListView's items should have their #onBeforeRender() method called as any other component in the tree. org.apache.wicket.markup.repeater.AbstractRepeater#onBeforeRender() first calls #onPopulate() (where ListView adds its children) and then calls super.onBeforeRender() where org.apache.wicket.MarkupContainer#onBeforeRenderChildren() that calls #onBeforeRender() for all children components. So IComponentOnBeforeRenderListener should be notified. Maybe a quickstart will make it easier for understanding where is the problem. On Mon, Nov 24, 2014 at 4:52 PM, mscoon msc...@gmail.com wrote: Martin, Application#getComponentPostOnBeforeRenderListeners is how I am already registering my FormErrorDecorator. Attaching the validation errors after super.onBeforeRender() does not work even for components that are statically added and not part of a list view. Here's some psuedocode: Form form = new Form(form, model) { protected void onBeforeRender() { super.onBeforeRender(); attachValidationErrors(); } } super.onBeforeRender() calls onBeforeRender() on all children which in turn calls both the componentPreOnBeforeRenderListeners and the componentPostOnBeforeRenderListeners. So by the time attachValidationErrors() is called the error decorator has run and finished (and done nothing as it found no errors). If I move attachValidationErrors before super.onBeforeRender(), then it works for statically added form components. It does not work for components within ListViews because populateItem has not yet been called. I could move some of the error attaching logic within populateItem but this is ugly and leads to code duplication (as populateItem will not always be called because I need setReuseItems(true)). Any other ideas? On Mon, Nov 24, 2014 at 3:23 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Try with org.apache.wicket.Application#getComponent*Post* OnBeforeRenderListeners() Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Nov 24, 2014 at 2:50 PM, mscoon msc...@gmail.com wrote: Hi all, I am using a FormErrorDecorator that implements an IComponentOnBeforeRenderListener in order to automatically attach a css class to form components with validation errors (see https://cwiki.apache.org/confluence/display/WICKET/Automatic+styling+of+form+errors ).
Re: Wicket6 setResponsePage() stackoverflow error.
Its updated at https://issues.apache.org/bugzilla/show_bug.cgi?id=57256 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket6-setResponsePage-stackoverflow-error-tp4668538p4668548.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: Wicket6 setResponsePage() stackoverflow error.
I guess it will be closed with message like Bugzilla is not support forum. Please use the mailing lists :-) But let's see. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Nov 25, 2014 at 12:20 PM, Milind m.gaw...@maxxton.com wrote: Its updated at https://issues.apache.org/bugzilla/show_bug.cgi?id=57256 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket6-setResponsePage-stackoverflow-error-tp4668538p4668548.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: Wicket6 setResponsePage() stackoverflow error.
Reported bug is closed https://issues.apache.org/bugzilla/show_bug.cgi?id=57256 Mark Thomas 2014-11-25 11:38:08 UTC You (or the application you are using) has created a wrapper that wraps itself. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket6-setResponsePage-stackoverflow-error-tp4668538p4668551.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: Wicket6 setResponsePage() stackoverflow error.
The only way I see this to happen is if SomeHttpServletRequestWrapper calls setRequest(this). There is no such usage of javax.servlet.ServletRequestWrapper#setRequest() in wicketstuff-portlet code. So it should be in Liferay's code ... Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Nov 25, 2014 at 1:38 PM, Milind m.gaw...@maxxton.com wrote: Reported bug is closed https://issues.apache.org/bugzilla/show_bug.cgi?id=57256 Mark Thomas 2014-11-25 11:38:08 UTC You (or the application you are using) has created a wrapper that wraps itself. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket6-setResponsePage-stackoverflow-error-tp4668538p4668551.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: IComponentOnBeforeRenderListener and ListView
attachValidationErrors has nothing to do with FormErrorDecorator. It is just some code that adds validation errors to some form components. I use it because I want to show validation errors right when then form opens, and not after a submit. For instance if the user loads a record for editing, and this record has some wrong data in it, I want to immediately show the validation errors when the page renders and not have to wait until a submit. On Tue, Nov 25, 2014 at 11:50 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, On Mon, Nov 24, 2014 at 10:34 PM, mscoon msc...@gmail.com wrote: Martin, I'll try once again to explain my problem and if it's still unclear I'll make the quickstart. What you say is right, the sequence of events is as you said. My problem is that everything happens in AbstractRepeater#onBeforeRender(). So I have to put my code attachValidationErrors either before or after AbstractRepeater#onBeforeRender(). If I put it before, the form components have not yet been created (onPopulate() has not yet been called). If I put it after, the componentPostOnBeforeRenderListeners have already run so the ErrorDecorator thinks there are no errors. What I need is a way for my code to run *after* onPopulate() but *before* onBeforeRenderChildren(). There is no such hook though. Let me also expand my pseudocode a bit in case this helps: class MyPage extends WebPage { pyblic MyPage() { Form form = new Form(form, model) { override onBeforeRender() { attachValidationErrors(); Why do you need to call that here at all ? Why you want to traverse the sub-tree manually ? By using IComponentOnBeforeRenderListener you are being notified for each and every Component in the component tree. So your listener should just check whether the component is an instance of FormComponent and if its name matches (and the other complex logic you have) then report the error. onBeforeRender(); } }; add(form); ListView list = new ListView(list, model2) { public populateItem(ListItem listItem) { add(new TextField(name, new PropertyModel(model2, name))); } } form.add(list); } void attachValidationErrors() { form.visitChildren(FormComponent.class, new IVisitorFormComponent,Void() { void component(FormComponent? obj, IVisitVoid visit) { if (obj.getId().equals(name) /* and some other complex logic here */) { obj.error(Please provide a name); } } }); } I think this makes my problem quite evident. I can't find the right place to put the call to attachValidationErrors(). Or perhaps I need a different implements for FormErrorDecorator. On Mon, Nov 24, 2014 at 5:13 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Maybe I miss something from your description but I think ListView's items should have their #onBeforeRender() method called as any other component in the tree. org.apache.wicket.markup.repeater.AbstractRepeater#onBeforeRender() first calls #onPopulate() (where ListView adds its children) and then calls super.onBeforeRender() where org.apache.wicket.MarkupContainer#onBeforeRenderChildren() that calls #onBeforeRender() for all children components. So IComponentOnBeforeRenderListener should be notified. Maybe a quickstart will make it easier for understanding where is the problem. On Mon, Nov 24, 2014 at 4:52 PM, mscoon msc...@gmail.com wrote: Martin, Application#getComponentPostOnBeforeRenderListeners is how I am already registering my FormErrorDecorator. Attaching the validation errors after super.onBeforeRender() does not work even for components that are statically added and not part of a list view. Here's some psuedocode: Form form = new Form(form, model) { protected void onBeforeRender() { super.onBeforeRender(); attachValidationErrors(); } } super.onBeforeRender() calls onBeforeRender() on all children which in turn calls both the componentPreOnBeforeRenderListeners and the componentPostOnBeforeRenderListeners. So by the time attachValidationErrors() is called the error decorator has run and finished (and done nothing as it found no errors). If I move attachValidationErrors before super.onBeforeRender(), then it works for statically added form components. It does not work for components within ListViews because populateItem has not yet been called. I could move some of the error attaching logic within populateItem but this is ugly and leads to code duplication (as populateItem will not always be called because I need setReuseItems(true)). Any other ideas? On
Re: IComponentOnBeforeRenderListener and ListView
OK, but isn't it possible to mark the form components as invalid with IComponentOnBeforeRenderListener too ? Just add the new IComponentOnBeforeRenderListener in the collection before FormErrorDecorator. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Nov 25, 2014 at 4:15 PM, mscoon msc...@gmail.com wrote: attachValidationErrors has nothing to do with FormErrorDecorator. It is just some code that adds validation errors to some form components. I use it because I want to show validation errors right when then form opens, and not after a submit. For instance if the user loads a record for editing, and this record has some wrong data in it, I want to immediately show the validation errors when the page renders and not have to wait until a submit. On Tue, Nov 25, 2014 at 11:50 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, On Mon, Nov 24, 2014 at 10:34 PM, mscoon msc...@gmail.com wrote: Martin, I'll try once again to explain my problem and if it's still unclear I'll make the quickstart. What you say is right, the sequence of events is as you said. My problem is that everything happens in AbstractRepeater#onBeforeRender(). So I have to put my code attachValidationErrors either before or after AbstractRepeater#onBeforeRender(). If I put it before, the form components have not yet been created (onPopulate() has not yet been called). If I put it after, the componentPostOnBeforeRenderListeners have already run so the ErrorDecorator thinks there are no errors. What I need is a way for my code to run *after* onPopulate() but *before* onBeforeRenderChildren(). There is no such hook though. Let me also expand my pseudocode a bit in case this helps: class MyPage extends WebPage { pyblic MyPage() { Form form = new Form(form, model) { override onBeforeRender() { attachValidationErrors(); Why do you need to call that here at all ? Why you want to traverse the sub-tree manually ? By using IComponentOnBeforeRenderListener you are being notified for each and every Component in the component tree. So your listener should just check whether the component is an instance of FormComponent and if its name matches (and the other complex logic you have) then report the error. onBeforeRender(); } }; add(form); ListView list = new ListView(list, model2) { public populateItem(ListItem listItem) { add(new TextField(name, new PropertyModel(model2, name))); } } form.add(list); } void attachValidationErrors() { form.visitChildren(FormComponent.class, new IVisitorFormComponent,Void() { void component(FormComponent? obj, IVisitVoid visit) { if (obj.getId().equals(name) /* and some other complex logic here */) { obj.error(Please provide a name); } } }); } I think this makes my problem quite evident. I can't find the right place to put the call to attachValidationErrors(). Or perhaps I need a different implements for FormErrorDecorator. On Mon, Nov 24, 2014 at 5:13 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Maybe I miss something from your description but I think ListView's items should have their #onBeforeRender() method called as any other component in the tree. org.apache.wicket.markup.repeater.AbstractRepeater#onBeforeRender() first calls #onPopulate() (where ListView adds its children) and then calls super.onBeforeRender() where org.apache.wicket.MarkupContainer#onBeforeRenderChildren() that calls #onBeforeRender() for all children components. So IComponentOnBeforeRenderListener should be notified. Maybe a quickstart will make it easier for understanding where is the problem. On Mon, Nov 24, 2014 at 4:52 PM, mscoon msc...@gmail.com wrote: Martin, Application#getComponentPostOnBeforeRenderListeners is how I am already registering my FormErrorDecorator. Attaching the validation errors after super.onBeforeRender() does not work even for components that are statically added and not part of a list view. Here's some psuedocode: Form form = new Form(form, model) { protected void onBeforeRender() { super.onBeforeRender(); attachValidationErrors(); } } super.onBeforeRender() calls onBeforeRender() on all children which in turn calls both the componentPreOnBeforeRenderListeners and the componentPostOnBeforeRenderListeners. So by the time attachValidationErrors() is called the error decorator has run and finished (and done nothing as it found no
Re: CSS3, PIE behavior and image resources
I know what a problem can be, if you read this: CSS3: Progressive Internet Explorer (PIE) http://basicuse.net/articles/pl/textile/html_css/css3_progressive_internet_explorer_pie . You will notice that it requires MIME-type in header without this, it won't work. I had painful experience about this. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CSS3-PIE-behavior-and-image-resources-tp4649699p4668555.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: Problems with wicket serialization
Did you try to set correct permissions for temp files in config? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problems-with-wicket-serialization-tp4668414p4668556.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: Why doesn't Wicket seem to call Session.replaceSession automatically?
Guten Tag Martin Grigorov, am Montag, 24. November 2014 um 20:44 schrieben Sie: https://issues.apache.org/jira/browse/WICKET-5775 Thanks a lot, I didn't have the time yet to create it on my own. Mit freundlichen Grüßen, Thorsten Schöning -- Thorsten Schöning E-Mail: thorsten.schoen...@am-soft.de AM-SoFT IT-Systeme http://www.AM-SoFT.de/ Telefon...05151- 9468- 55 Fax...05151- 9468- 88 Mobil..0178-8 9468- 04 AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Could not clear select2Choice component model value.
Hi Maxim, The change has been introduced in Wicket-Select2 with https://github.com/ivaynberg/wicket-select2/issues/29 I'll see how to fix it now. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Nov 12, 2014 at 12:11 PM, Martin Grigorov mgrigo...@apache.org wrote: It is in my TODO list... Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Nov 11, 2014 at 6:29 PM, Maxim Solodovnik solomax...@gmail.com wrote: Hello Martin, I know you are busy man ..., but, were you able to take a look at this issue? :) On 22 October 2014 11:23, Maxim Solodovnik solomax...@gmail.com wrote: It seems like script generated in renderInitializationScript should be added to AjaxRequestTarget on every Ajax update ... On 21 October 2014 17:09, Maxim Solodovnik solomax...@gmail.com wrote: Here it is: https://github.com/solomax/WicketSelect2Clear somehow in this example nothing works as expected :( I tried 2 different approaches, correct new value arrives to the page (according to wicket debug) but select2 is not being updated :( On 21 October 2014 13:23, Martin Grigorov mgrigo...@apache.org wrote: Hi Maxim, Please prepare a quickstart at GitHub and I'll take a look. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Oct 17, 2014 at 5:42 PM, Maxim Solodovnik solomax...@gmail.com wrote: Martin, I have forked select2, unfortunately I'm still not sure how to fix the issue :( Clean link is added to the form and select data is being restored from requestParameters :( On 13 October 2014 19:06, Martin Grigorov mgrigo...@apache.org wrote: Maxim, Feel free to fork it! I.e. move it to WicketStuff. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Oct 9, 2014 at 8:53 PM, Maxim Solodovnik solomax...@gmail.com wrote: Additionally select2 seems to need to be forked to wicketstuff to be fixed, should I do this? On 10 October 2014 00:49, Maxim Solodovnik solomax...@gmail.com wrote: @Paul, @Martin Select2Choice sets back its value to getWebRequest().getRequestParameters().getParameterNames() in renderInitializationScript method [1] It seems like JS code like: $(#country1).select2(data, null); can be executed on clear input, but this seems to be workaround I'm not sure why [1] method is used to get value, maybe you can suggest correct way of fixing this? [1] https://github.com/ivaynberg/wicket-select2/blob/master/wicket-select2/src/main/java/com/vaynberg/wicket/select2/Select2Choice.java#L62 On 9 October 2014 16:39, MadasamySankarapandian madas...@mcruncher.com wrote: Thanks Maxim Solodovnik. On Thu, Oct 9, 2014 at 12:33 PM, Maxim Solodovnik solomax...@gmail.com wrote: I also noticed this issue in our project, Will try to take a look at it On 9 October 2014 07:33, MadasamySankarapandian madas...@mcruncher.com wrote: Thankyou very much for yours reply. I call formComponent.clearInput() in my ClearFormVisitor class. But It does not work. I have created issue-96 https://github.com/ivaynberg/wicket-select2/issues/96 in wicket-select2 project. On Wed, Oct 8, 2014 at 12:13 AM, Maxim Solodovnik solomax...@gmail.com wrote: Done, thanks for pointing this out On 7 October 2014 23:08, Paul Bors p...@bors.ws wrote: Can you update this issue then? https://github.com/ivaynberg/wicket-select2/issues/93 On Tue, Oct 7, 2014 at 12:00 PM, Maxim Solodovnik solomax...@gmail.com wrote: we recently moved this component to wicketstuff: https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/select2-parent to get Wicket7 compatible version On 7 October 2014 22:56, Paul Bors p...@bors.ws wrote: You can also ask the developer via: https://github.com/ivaynberg/wicket-select2/issues You should probably take a look over the open issues so that you are familiar with that other developers faced. Maybe one of those issues might be a road block for you? Although you will get a faster reply from Igor or another Wicket developer
Re: Wicket6 setResponsePage() stackoverflow error.
I know it's not the error you report, but did you add liferay-web-xml-enabled=false in the liferay-plugin-package.properties file. I had to do that to have portlet work with liferay 6.1 and 6.2 see : http://apache-wicket.1842946.n4.nabble.com/wicket-portlet-and-liferay-6-1-td4650001.html Also I'm not using PageParameters, but constructors : setResponsePage(new MyClass(param1, param2, ...)) I also had to tweak a few files in the wicketstuff-portlet : -PortletRequesMapper (to handle BookmarkableListenerInterfaceRequestHandler) -WicketPorlet and ResponseStat (to fix some ajax issues) wicketstuff-portlet-6.jar http://apache-wicket.1842946.n4.nabble.com/file/n4668558/wicketstuff-portlet-6.jar But still from time to time I've got problem with wicket-portlet and liferay with an infinite loop that use 100% CPU. Unfortunatly I'm not skilled enough in Porlet spec to fix this. So from my point of view wicketstuff-portlet is not production safe anymore... Hope this help, Gabriel. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket6-setResponsePage-stackoverflow-error-tp4668538p4668558.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: Could not clear select2Choice component model value.
Fixed with https://github.com/wicketstuff/core/commit/b7e5b68b858336d85958663204166bd0852b43dd Hopefully all other use cases are still covered. I just noticed that there is https://github.com/wicketstuff/core/tree/wicket-6.x/jdk-1.6-parent/select2-parent (i.e. Wicket 6.x version). It would be good if someone backports the improvements from master branch to wicket-6.x: https://github.com/wicketstuff/core/commits/master/jdk-1.7-parent/select2-parent It seems Igor has been active last month at https://github.com/ivaynberg/wicket-select2/ and merged few PRs. I've ported them to WicketStuff 7.x but not to 6.x. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Nov 25, 2014 at 8:48 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi Maxim, The change has been introduced in Wicket-Select2 with https://github.com/ivaynberg/wicket-select2/issues/29 I'll see how to fix it now. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Nov 12, 2014 at 12:11 PM, Martin Grigorov mgrigo...@apache.org wrote: It is in my TODO list... Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Nov 11, 2014 at 6:29 PM, Maxim Solodovnik solomax...@gmail.com wrote: Hello Martin, I know you are busy man ..., but, were you able to take a look at this issue? :) On 22 October 2014 11:23, Maxim Solodovnik solomax...@gmail.com wrote: It seems like script generated in renderInitializationScript should be added to AjaxRequestTarget on every Ajax update ... On 21 October 2014 17:09, Maxim Solodovnik solomax...@gmail.com wrote: Here it is: https://github.com/solomax/WicketSelect2Clear somehow in this example nothing works as expected :( I tried 2 different approaches, correct new value arrives to the page (according to wicket debug) but select2 is not being updated :( On 21 October 2014 13:23, Martin Grigorov mgrigo...@apache.org wrote: Hi Maxim, Please prepare a quickstart at GitHub and I'll take a look. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Oct 17, 2014 at 5:42 PM, Maxim Solodovnik solomax...@gmail.com wrote: Martin, I have forked select2, unfortunately I'm still not sure how to fix the issue :( Clean link is added to the form and select data is being restored from requestParameters :( On 13 October 2014 19:06, Martin Grigorov mgrigo...@apache.org wrote: Maxim, Feel free to fork it! I.e. move it to WicketStuff. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Oct 9, 2014 at 8:53 PM, Maxim Solodovnik solomax...@gmail.com wrote: Additionally select2 seems to need to be forked to wicketstuff to be fixed, should I do this? On 10 October 2014 00:49, Maxim Solodovnik solomax...@gmail.com wrote: @Paul, @Martin Select2Choice sets back its value to getWebRequest().getRequestParameters().getParameterNames() in renderInitializationScript method [1] It seems like JS code like: $(#country1).select2(data, null); can be executed on clear input, but this seems to be workaround I'm not sure why [1] method is used to get value, maybe you can suggest correct way of fixing this? [1] https://github.com/ivaynberg/wicket-select2/blob/master/wicket-select2/src/main/java/com/vaynberg/wicket/select2/Select2Choice.java#L62 On 9 October 2014 16:39, MadasamySankarapandian madas...@mcruncher.com wrote: Thanks Maxim Solodovnik. On Thu, Oct 9, 2014 at 12:33 PM, Maxim Solodovnik solomax...@gmail.com wrote: I also noticed this issue in our project, Will try to take a look at it On 9 October 2014 07:33, MadasamySankarapandian madas...@mcruncher.com wrote: Thankyou very much for yours reply. I call formComponent.clearInput() in my ClearFormVisitor class. But It does not work. I have created issue-96 https://github.com/ivaynberg/wicket-select2/issues/96 in wicket-select2 project. On Wed, Oct 8, 2014 at 12:13 AM, Maxim Solodovnik solomax...@gmail.com wrote: Done, thanks for pointing this out On 7 October 2014 23:08, Paul Bors p...@bors.ws wrote: Can you update this issue then? https://github.com/ivaynberg/wicket-select2/issues/93 On Tue, Oct 7, 2014 at 12:00 PM, Maxim Solodovnik solomax...@gmail.com wrote: we recently moved this component to wicketstuff:
Re: Wicket6 setResponsePage() stackoverflow error.
Gabriel, did you consider offering the patch to the wicketstuff project? Maybe those changes are general improvements for all of us. Thanks for sharing anyway! On Tue, Nov 25, 2014 at 7:49 PM, Gabriel Landon glan...@piti.pf wrote: I know it's not the error you report, but did you add liferay-web-xml-enabled=false in the liferay-plugin-package.properties file. I had to do that to have portlet work with liferay 6.1 and 6.2 see : http://apache-wicket.1842946.n4.nabble.com/wicket-portlet-and-liferay-6-1-td4650001.html Also I'm not using PageParameters, but constructors : setResponsePage(new MyClass(param1, param2, ...)) I also had to tweak a few files in the wicketstuff-portlet : -PortletRequesMapper (to handle BookmarkableListenerInterfaceRequestHandler) -WicketPorlet and ResponseStat (to fix some ajax issues) wicketstuff-portlet-6.jar http://apache-wicket.1842946.n4.nabble.com/file/n4668558/wicketstuff-portlet-6.jar But still from time to time I've got problem with wicket-portlet and liferay with an infinite loop that use 100% CPU. Unfortunatly I'm not skilled enough in Porlet spec to fix this. So from my point of view wicketstuff-portlet is not production safe anymore... Hope this help, Gabriel. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket6-setResponsePage-stackoverflow-error-tp4668538p4668558.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: IComponentOnBeforeRenderListener and ListView
I don't want to use an IComponentOnBeforeRenderListener as it is an application wide facility whereas what I'm doing applies to a couple of pages only. But you suggestion gave me an idea. I am now using a behavior which I add to all form components in ListView#populateItem(). The behavior marks the components as invalid in onConfigure() which comes before onBeforeRender() and hence before the IComponentOnBeforeRenderListener. The problem with this solution is that this code is much more complicated than what I was doing originally. Now I have to put the validation errors in a transient field which is set in the form's onConfigure() method, and use this field to retrieve the errors from within Behavior#onConfigure(). What I tried to do originally was much cleaner, the model object was validated and the components invalidated from within a single method. It does seem like AbstractRepeater should have a postOnPopulate() method to allow client code to access the created components before onBeforeRender() is executed, don't you think? On Tue, Nov 25, 2014 at 4:29 PM, Martin Grigorov mgrigo...@apache.org wrote: OK, but isn't it possible to mark the form components as invalid with IComponentOnBeforeRenderListener too ? Just add the new IComponentOnBeforeRenderListener in the collection before FormErrorDecorator. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Nov 25, 2014 at 4:15 PM, mscoon msc...@gmail.com wrote: attachValidationErrors has nothing to do with FormErrorDecorator. It is just some code that adds validation errors to some form components. I use it because I want to show validation errors right when then form opens, and not after a submit. For instance if the user loads a record for editing, and this record has some wrong data in it, I want to immediately show the validation errors when the page renders and not have to wait until a submit. On Tue, Nov 25, 2014 at 11:50 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, On Mon, Nov 24, 2014 at 10:34 PM, mscoon msc...@gmail.com wrote: Martin, I'll try once again to explain my problem and if it's still unclear I'll make the quickstart. What you say is right, the sequence of events is as you said. My problem is that everything happens in AbstractRepeater#onBeforeRender(). So I have to put my code attachValidationErrors either before or after AbstractRepeater#onBeforeRender(). If I put it before, the form components have not yet been created (onPopulate() has not yet been called). If I put it after, the componentPostOnBeforeRenderListeners have already run so the ErrorDecorator thinks there are no errors. What I need is a way for my code to run *after* onPopulate() but *before* onBeforeRenderChildren(). There is no such hook though. Let me also expand my pseudocode a bit in case this helps: class MyPage extends WebPage { pyblic MyPage() { Form form = new Form(form, model) { override onBeforeRender() { attachValidationErrors(); Why do you need to call that here at all ? Why you want to traverse the sub-tree manually ? By using IComponentOnBeforeRenderListener you are being notified for each and every Component in the component tree. So your listener should just check whether the component is an instance of FormComponent and if its name matches (and the other complex logic you have) then report the error. onBeforeRender(); } }; add(form); ListView list = new ListView(list, model2) { public populateItem(ListItem listItem) { add(new TextField(name, new PropertyModel(model2, name))); } } form.add(list); } void attachValidationErrors() { form.visitChildren(FormComponent.class, new IVisitorFormComponent,Void() { void component(FormComponent? obj, IVisitVoid visit) { if (obj.getId().equals(name) /* and some other complex logic here */) { obj.error(Please provide a name); } } }); } I think this makes my problem quite evident. I can't find the right place to put the call to attachValidationErrors(). Or perhaps I need a different implements for FormErrorDecorator. On Mon, Nov 24, 2014 at 5:13 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Maybe I miss something from your description but I think ListView's items should have their #onBeforeRender() method called as any other component in the tree. org.apache.wicket.markup.repeater.AbstractRepeater#onBeforeRender() first calls #onPopulate() (where ListView adds its children) and then calls
Re: IComponentOnBeforeRenderListener and ListView
On Tue, Nov 25, 2014 at 11:33 PM, mscoon msc...@gmail.com wrote: I don't want to use an IComponentOnBeforeRenderListener as it is an application wide facility whereas what I'm doing applies to a couple of pages only. But you suggestion gave me an idea. I am now using a behavior which I add to all form components in ListView#populateItem(). The behavior marks the components as invalid in onConfigure() which comes before onBeforeRender() and hence before the IComponentOnBeforeRenderListener. The problem with this solution is that this code is much more complicated than what I was doing originally. Now I have to put the validation errors in a transient field which is set in the form's onConfigure() method, and use this field to retrieve the errors from within Behavior#onConfigure(). What I tried to do originally was much cleaner, the model object was validated and the components invalidated from within a single method. It does seem like AbstractRepeater should have a postOnPopulate() method to allow client code to access the created components before onBeforeRender() is executed, don't you think? You can use populateItem() for this, no ? On Tue, Nov 25, 2014 at 4:29 PM, Martin Grigorov mgrigo...@apache.org wrote: OK, but isn't it possible to mark the form components as invalid with IComponentOnBeforeRenderListener too ? Just add the new IComponentOnBeforeRenderListener in the collection before FormErrorDecorator. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Nov 25, 2014 at 4:15 PM, mscoon msc...@gmail.com wrote: attachValidationErrors has nothing to do with FormErrorDecorator. It is just some code that adds validation errors to some form components. I use it because I want to show validation errors right when then form opens, and not after a submit. For instance if the user loads a record for editing, and this record has some wrong data in it, I want to immediately show the validation errors when the page renders and not have to wait until a submit. On Tue, Nov 25, 2014 at 11:50 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, On Mon, Nov 24, 2014 at 10:34 PM, mscoon msc...@gmail.com wrote: Martin, I'll try once again to explain my problem and if it's still unclear I'll make the quickstart. What you say is right, the sequence of events is as you said. My problem is that everything happens in AbstractRepeater#onBeforeRender(). So I have to put my code attachValidationErrors either before or after AbstractRepeater#onBeforeRender(). If I put it before, the form components have not yet been created (onPopulate() has not yet been called). If I put it after, the componentPostOnBeforeRenderListeners have already run so the ErrorDecorator thinks there are no errors. What I need is a way for my code to run *after* onPopulate() but *before* onBeforeRenderChildren(). There is no such hook though. Let me also expand my pseudocode a bit in case this helps: class MyPage extends WebPage { pyblic MyPage() { Form form = new Form(form, model) { override onBeforeRender() { attachValidationErrors(); Why do you need to call that here at all ? Why you want to traverse the sub-tree manually ? By using IComponentOnBeforeRenderListener you are being notified for each and every Component in the component tree. So your listener should just check whether the component is an instance of FormComponent and if its name matches (and the other complex logic you have) then report the error. onBeforeRender(); } }; add(form); ListView list = new ListView(list, model2) { public populateItem(ListItem listItem) { add(new TextField(name, new PropertyModel(model2, name))); } } form.add(list); } void attachValidationErrors() { form.visitChildren(FormComponent.class, new IVisitorFormComponent,Void() { void component(FormComponent? obj, IVisitVoid visit) { if (obj.getId().equals(name) /* and some other complex logic here */) { obj.error(Please provide a name); } } }); } I think this makes my problem quite evident. I can't find the right place to put the call to attachValidationErrors(). Or perhaps I need a different implements for FormErrorDecorator. On Mon, Nov 24, 2014 at 5:13 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Maybe I miss something from your description but I think ListView's items
Re: Wicket6 setResponsePage() stackoverflow error.
Well I don't known if the code I've modified is relieable enough... I've just debug what seems to be wrong for my personal usecases. Feel free to use it and improve it! For me the wicketuff-portlet code is a complete maze!! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket6-setResponsePage-stackoverflow-error-tp4668538p4668566.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: IComponentOnBeforeRenderListener and ListView
On Tue, Nov 25, 2014 at 11:40 PM, Martin Grigorov mgrigo...@apache.org wrote: On Tue, Nov 25, 2014 at 11:33 PM, mscoon msc...@gmail.com wrote: I don't want to use an IComponentOnBeforeRenderListener as it is an application wide facility whereas what I'm doing applies to a couple of pages only. But you suggestion gave me an idea. I am now using a behavior which I add to all form components in ListView#populateItem(). The behavior marks the components as invalid in onConfigure() which comes before onBeforeRender() and hence before the IComponentOnBeforeRenderListener. The problem with this solution is that this code is much more complicated than what I was doing originally. Now I have to put the validation errors in a transient field which is set in the form's onConfigure() method, and use this field to retrieve the errors from within Behavior#onConfigure(). What I tried to do originally was much cleaner, the model object was validated and the components invalidated from within a single method. It does seem like AbstractRepeater should have a postOnPopulate() method to allow client code to access the created components before onBeforeRender() is executed, don't you think? You can use populateItem() for this, no ? Not all of them at once, no. You only get to access the components within a single ListItem. But as we talk about it I see now that this is a very specific and limited use case, probably not worth considering changes to wicket for this. Thanks for your time!
Re: Could not clear select2Choice component model value.
Thanks a lot! I'll backport! On Wed, Nov 26, 2014 at 1:34 AM, Martin Grigorov mgrigo...@apache.org wrote: Fixed with https://github.com/wicketstuff/core/commit/b7e5b68b858336d85958663204166bd0852b43dd Hopefully all other use cases are still covered. I just noticed that there is https://github.com/wicketstuff/core/tree/wicket-6.x/jdk-1.6-parent/select2-parent (i.e. Wicket 6.x version). It would be good if someone backports the improvements from master branch to wicket-6.x: https://github.com/wicketstuff/core/commits/master/jdk-1.7-parent/select2-parent It seems Igor has been active last month at https://github.com/ivaynberg/wicket-select2/ and merged few PRs. I've ported them to WicketStuff 7.x but not to 6.x. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Nov 25, 2014 at 8:48 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi Maxim, The change has been introduced in Wicket-Select2 with https://github.com/ivaynberg/wicket-select2/issues/29 I'll see how to fix it now. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Nov 12, 2014 at 12:11 PM, Martin Grigorov mgrigo...@apache.org wrote: It is in my TODO list... Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Nov 11, 2014 at 6:29 PM, Maxim Solodovnik solomax...@gmail.com wrote: Hello Martin, I know you are busy man ..., but, were you able to take a look at this issue? :) On 22 October 2014 11:23, Maxim Solodovnik solomax...@gmail.com wrote: It seems like script generated in renderInitializationScript should be added to AjaxRequestTarget on every Ajax update ... On 21 October 2014 17:09, Maxim Solodovnik solomax...@gmail.com wrote: Here it is: https://github.com/solomax/WicketSelect2Clear somehow in this example nothing works as expected :( I tried 2 different approaches, correct new value arrives to the page (according to wicket debug) but select2 is not being updated :( On 21 October 2014 13:23, Martin Grigorov mgrigo...@apache.org wrote: Hi Maxim, Please prepare a quickstart at GitHub and I'll take a look. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Oct 17, 2014 at 5:42 PM, Maxim Solodovnik solomax...@gmail.com wrote: Martin, I have forked select2, unfortunately I'm still not sure how to fix the issue :( Clean link is added to the form and select data is being restored from requestParameters :( On 13 October 2014 19:06, Martin Grigorov mgrigo...@apache.org wrote: Maxim, Feel free to fork it! I.e. move it to WicketStuff. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Oct 9, 2014 at 8:53 PM, Maxim Solodovnik solomax...@gmail.com wrote: Additionally select2 seems to need to be forked to wicketstuff to be fixed, should I do this? On 10 October 2014 00:49, Maxim Solodovnik solomax...@gmail.com wrote: @Paul, @Martin Select2Choice sets back its value to getWebRequest().getRequestParameters().getParameterNames() in renderInitializationScript method [1] It seems like JS code like: $(#country1).select2(data, null); can be executed on clear input, but this seems to be workaround I'm not sure why [1] method is used to get value, maybe you can suggest correct way of fixing this? [1] https://github.com/ivaynberg/wicket-select2/blob/master/wicket-select2/src/main/java/com/vaynberg/wicket/select2/Select2Choice.java#L62 On 9 October 2014 16:39, MadasamySankarapandian madas...@mcruncher.com wrote: Thanks Maxim Solodovnik. On Thu, Oct 9, 2014 at 12:33 PM, Maxim Solodovnik solomax...@gmail.com wrote: I also noticed this issue in our project, Will try to take a look at it On 9 October 2014 07:33, MadasamySankarapandian madas...@mcruncher.com wrote: Thankyou very much for yours reply. I call formComponent.clearInput() in my ClearFormVisitor class. But It does not work. I have created issue-96 https://github.com/ivaynberg/wicket-select2/issues/96 in wicket-select2 project. On Wed, Oct 8, 2014 at 12:13 AM, Maxim Solodovnik solomax...@gmail.com wrote: Done, thanks for pointing this out On 7 October 2014 23:08, Paul Bors p...@bors.ws wrote: Can you update this issue
Re: Wicket6 setResponsePage() stackoverflow error.
Hi Gabriel, yes we are already changed it to *liferay-web-xml-enabled=false* -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket6-setResponsePage-stackoverflow-error-tp4668538p4668569.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