Re: Question on Double Submit and rendering strategy

2014-11-24 Thread Martin Grigorov
Hi, What you observe is correct ! Wicket support for Redirect after Post http://en.wikipedia.org/wiki/Post/Redirect/Get is to prevent double submit of a form if the user reloads the page (Ctrl+R or F5) or if the user navigates back. In these cases usually the browser would ask you whether you

Why doesn't Wicket seem to call Session.replaceSession automatically?

2014-11-24 Thread Thorsten Schöning
Hi all, during implementing the login a my current project I came across WICKET-1767[1] which deals with session fixation problems, but to my surprise it looks like the newly created method is not called automatically by Wicket. If I search the code base for replaceSession( I only get one result,

Re: Why doesn't Wicket seem to call Session.replaceSession automatically?

2014-11-24 Thread Martin Grigorov
Hi, wicket-auth-roles module was designed and advertised as an example rather than an extension for security best practices. But I agree with you that we could add that feature there. Please create a ticket at JIRA. Preferably with a patch or pull request at GitHub. Thank you! Martin Grigorov

Remove components from AjaxRequestTarget

2014-11-24 Thread Andre Camilo
Hi all, I'm trying to create a component that has better Ajax support for ListViews with Form components. I'm doing this by making diffs on the List for each ajax request and reordering the elements with javascript. Now I'm trying to remove my component from AjaxRequestTarget beforeRender

Re: Remove components from AjaxRequestTarget

2014-11-24 Thread Martin Grigorov
Hi, You can use org.apache.wicket.ajax.AjaxRequestTarget.IListener#onBeforeRespond(Map, AjaxRequestTarget) and remove entries from the map. See https://github.com/apache/wicket/blob/master/wicket-core/src/test/java/org/apache/wicket/ajax/GlobalUpdateAjaxAttributesTest.java#L40 for how to setup.

IComponentOnBeforeRenderListener and ListView

2014-11-24 Thread mscoon
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 ). Sometimes I want to

Re: IComponentOnBeforeRenderListener and ListView

2014-11-24 Thread Martin Grigorov
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

Re: IComponentOnBeforeRenderListener and ListView

2014-11-24 Thread mscoon
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

Re: Remove components from AjaxRequestTarget

2014-11-24 Thread Andre Camilo
Hey, that worked, thanks :) On 24-11-2014 12:02, Martin Grigorov wrote: Hi, You can use org.apache.wicket.ajax.AjaxRequestTarget.IListener#onBeforeRespond(Map, AjaxRequestTarget) and remove entries from the map. See

Re: IComponentOnBeforeRenderListener and ListView

2014-11-24 Thread Martin Grigorov
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

Re: What is the proper way to start a secondary process in Wicket 6

2014-11-24 Thread Martin Grigorov
Hi Ernesto, See https://github.com/reiern70/antilia-bits/pull/1 I've moved the code that exports the Application thread local to TasksRunnable. This way it is possible to export the Session too. The code looks good (after removing all annoying whitespaces :-) ). Now it needs some explanation

Re: Why doesn't Wicket seem to call Session.replaceSession automatically?

2014-11-24 Thread Martin Grigorov
https://issues.apache.org/jira/browse/WICKET-5775 Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Nov 24, 2014 at 11:36 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, wicket-auth-roles module was designed and advertised as an example rather than an

Re: IComponentOnBeforeRenderListener and ListView

2014-11-24 Thread mscoon
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

RE: Question on Double Submit and rendering strategy

2014-11-24 Thread Hesketh, Mark
Thanks for that Martin - I understand. Thanks also for the alternate approaches. I think we might experiment with the AjaxChannel#ACTIVE approach as an alternative although we do have the veil approach ready to ship. Cheers. -Original Message- From: Martin Grigorov

Wicket6 setResponsePage() stackoverflow error.

2014-11-24 Thread Milind
Hello, I am using Liferay liferay-portal-6.2-ce-ga2 with Wicket6 and when setResponsePage(MyClass.class, params); is called it gives stackoverflow error. Does anyone came across similar error? http://www.liferay.com/community/forums/-/message_boards/message/45604006

Re: Wicket6 setResponsePage() stackoverflow error.

2014-11-24 Thread Paul Bors
I'm no expert but it looks as if your filter from Liferay is looping calls into Wicket's filter and vice-versa. What's your web.xml config? On Tue, Nov 25, 2014 at 12:22 AM, Milind m.gaw...@maxxton.com wrote: Hello, I am using Liferay liferay-portal-6.2-ce-ga2 with Wicket6 and when

Re: What is the proper way to start a secondary process in Wicket 6

2014-11-24 Thread Ernesto Reinaldo Barreiro
@Martin, Many thanks! I will try to have a look today at the PR and see if I find the time to write the blogs article during this week. Thanks again! On Mon, Nov 24, 2014 at 5:46 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi Ernesto, See https://github.com/reiern70/antilia-bits/pull/1

Re: Wicket6 setResponsePage() stackoverflow error.

2014-11-24 Thread Milind
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