Re: Unnecessary 302 redirects in Wicket 1.5

2012-06-25 Thread sylvain
Hi, In order to avoid redirect, we add this code in our application class : setPageRendererProvider(new IPageRendererProvider() { @Override public PageRenderer get(final RenderPageRequestHandler context) { return

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-05 Thread TH Lim
This worked. It didn't do a POST/REDIRECT/GET when I posted from Javascript and/or HTML Form. This solution works great because, as you mentioned, I can use @SpringBean and other Wicket features along side with it. Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.c

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-03 Thread Serban.Balamaci
Hi Lim, What about using an AbstractResource instead for serving the xml. You can do something like: @Override protected ResourceResponse newResourceResponse(Attributes attributes) { final ResourceResponse response = new ResourceResponse(); PageParameters requestPa

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-03 Thread TH Lim
I could use a servlet. I thought I could easily setup a Wicket page to do something similar. Since I have @SpringBean ready to load services and DAOs. I was almost there. Just that I couldn't get the NEVER_REDIRECT directive work on a per page basis instead of global. -- View this message in con

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-03 Thread Martin Grigorov
For this you don't need Wicket Page at all. Just use a normal Servlet, fire a POST request to its URL and return whatever response you need. On Fri, Feb 3, 2012 at 5:19 PM, TH Lim wrote: > What I want is a very simple end point to service a POST request originated > from my JS using AJAX. What I

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-03 Thread TH Lim
What I want is a very simple end point to service a POST request originated from my JS using AJAX. What I was expecting was to do a POST and returned an acknowledgement as response. What happened was, after the POST request, the browser received a HTTP 302 to redirect the browser to GET the final

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-03 Thread Martin Grigorov
Please start over with your problem. What do you want to achieve? What did you try? What problems did you face ? And I'm not sure what is PRG. On Fri, Feb 3, 2012 at 4:47 PM, TH Lim wrote: > Thanks for your help so far. It would be great if you could pass me some > hints to allow me to do some re

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-03 Thread TH Lim
Thanks for your help so far. It would be great if you could pass me some hints to allow me to do some research on my own. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Unnecessary-302-redirects-in-Wicket-1-5-tp3921623p4354785.html Sent from the Users forum mai

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-03 Thread TH Lim
I tried and observed the PRG behavior as before. Even if it had worked, for every page I need to an additional "transfer" page. I don't think this is a good solution. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Unnecessary-302-redirects-in-Wicket-1-5-tp3921623p4354

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-03 Thread Martin Grigorov
On Fri, Feb 3, 2012 at 12:05 PM, TH Lim wrote: > The original constructor was > > public class AppLogin extends WebPage implements IMarkupCacheKeyProvider, > IMarkupResourceStreamProvider >  { >    public AppLogin(PageParameters params) { >        setStatelessHint(true); >        startAsyncProcss(

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-03 Thread TH Lim
The original constructor was public class AppLogin extends WebPage implements IMarkupCacheKeyProvider, IMarkupResourceStreamProvider { public AppLogin(PageParameters params) { setStatelessHint(true); startAsyncProcss(params); * throw new RestartResponseException(new Pag

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-03 Thread Martin Grigorov
There is no code related to redirections below. On Fri, Feb 3, 2012 at 11:06 AM, TH Lim wrote: > import org.apache.wicket.MarkupContainer; > import org.apache.wicket.markup.IMarkupCacheKeyProvider; > import org.apache.wicket.markup.IMarkupResourceStreamProvider; > import org.apache.wicket.markup.

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-03 Thread TH Lim
import org.apache.wicket.MarkupContainer; import org.apache.wicket.markup.IMarkupCacheKeyProvider; import org.apache.wicket.markup.IMarkupResourceStreamProvider; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.request.http.WebResponse; import org.apache.wicket.request.mapper.

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-02 Thread Martin Grigorov
Can you share your code so we can take a look and help you ? On Fri, Feb 3, 2012 at 9:04 AM, TH Lim wrote: > The compilation error was my fault. I tried and it didn't work. Probably I > missed something. What I did was throw the RestartResponseException at the > end of the said page and StackOver

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-02 Thread TH Lim
The compilation error was my fault. I tried and it didn't work. Probably I missed something. What I did was throw the RestartResponseException at the end of the said page and StackOverflowException was thrown, quite obvious to me what has happened. With my limited knowledge of Wicket internal worki

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-02 Thread TH Lim
I have compilation error with this statement. Any help here would be great. And I suppose I put this line of code at the end of my web page constructor, right? Martin Grigorov-4 wrote > > On Thu, Feb 2, 2012 at 1:27 PM, TH Lim wrote: >> Is it possible to set the redirect feature locali

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-02 Thread Martin Grigorov
On Thu, Feb 2, 2012 at 1:27 PM, TH Lim wrote: > Is it possible to set the redirect feature localized to a page instead of > every page? There are 2 out 10 pages I don't want to redirect. Thanks Experiment with new RestartResponseException(new PageProvider(YourPage.class, PageParameters), Redirect

Re: Unnecessary 302 redirects in Wicket 1.5

2012-02-02 Thread TH Lim
Is it possible to set the redirect feature localized to a page instead of every page? There are 2 out 10 pages I don't want to redirect. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Unnecessary-302-redirects-in-Wicket-1-5-tp3921623p4351160.html Sent from the

Re: Unnecessary 302 redirects in Wicket 1.5

2011-10-20 Thread Martin Grigorov
Another problem is that without ?3 if your user reloads the page (F5) Wicket wont know which page instance to re-render and will create a new instance of the page. I.e. the state will be lost. In Wicket 1.4 ?wicket:interface=0:0:bla:1: is used to keep the page id. If you don't want this special pa

Re: Unnecessary 302 redirects in Wicket 1.5

2011-10-20 Thread Deniz Oğuz
I think redirect is performed as a solution to double post problem. You can disable it from RequestCycleSetting by setting it to One Pass Render. On Thu, Oct 20, 2011 at 1:53 PM, Илья Нарыжный wrote: > Hello, > > Could you please explain for what reason wicket for every page redirects > users to

Unnecessary 302 redirects in Wicket 1.5

2011-10-20 Thread Илья Нарыжный
Hello, Could you please explain for what reason wicket for every page redirects users to some other page by 302 code? For example from /home user will be redirected to /home?1 etc. It seems quite strange and I think, that this is much more strange for Search Engines. I found solution how to optimi