Hi 

I am using 1.0 ... 

I followed the stack traced to "BufferedWebResponse.redirect"... where
it throws the runtime error. (BufferedWebResponse.redirect) and saw
what is causing the exception...and it was testing to see if redirect
was true....

So in my constructor, I actually setRedirect(false)  first before
redirectTo(new Page...)
and it worked around. :)

not sure if this is logical, as i pretty new to this, but at least the
error message is gone...


Josh :) 




BufferedWebResponse.java
....

        public final void redirect(final String url)
        {
        if (redirect)
        {
                throw new WicketRuntimeException("Already redirecting to '" +
redirectURL + "'. Cannot redirect more than once");
        }
                super.redirect = true;
                this.redirectURL = url;
        }


On 7/16/05, Matej Knopp <[EMAIL PROTECTED]> wrote:
> Strange enough, It works well for me.
> Are you sure you are calling redirectTo only once? This seems like you
> are trying to call it multiple times...
> 
> -Matej
> 
> Btw. what version are you using? If it's 1.1 from CVS there's some new
> code that can redirect you immediately when displaying home page, but
> this doesn't seem to be the case.
> 
> josh lim wrote:
> > Hi
> >
> > It _does_ work with redirectToInterceptPage and redirectTo,  but I get
> > this error below...
> >
> > wicket.WicketRuntimeException: Already redirecting to
> > '/idea/survey?component=4&version=0&interface=IRedirectListener'.
> > Cannot redirect more than once
> > ....
> >
> > Josh
> >
> >
> >
> >
> >
> > On 7/16/05, Matej Knopp <[EMAIL PROTECTED]> wrote:
> >
> >>It doesn't seem to be inconsistent to me.
> >>
> >>SetResponsePage sets a page to respond. But IMHO to respond you need an
> >>action first. In constructor, there's no such action. When you click on
> >>a link or submit a form, it is an action. So SetResponsePage works.
> >>
> >>But this is just as I see it. It's possible that it's meant otherwise
> >>and it's just a bug.
> >>
> >>Maybe it would be better if SetResponsePage worked this well. But I
> >>think that it's worth implementing only if it's not a big change/hack to
> >>wicket action/request/response handling.
> >>
> >>-Matej
> >>
> >>Eelco Hillenius wrote:
> >>
> >>>Yes, but I think it is inconsistent. Don't you think so?
> >>>
> >>>Eelco
> >>>
> >>>Matej Knopp wrote:
> >>>
> >>>
> >>>>This does work, but you have to call redirectTo instead of
> >>>>setResponsePage in your constructor.
> >>>>
> >>>>like
> >>>>redirectTo (new Page1(parameters));
> >>>>
> >>>>-Matej
> >>>>
> >>>>josh lim wrote:
> >>>>
> >>>>
> >>>>>I tried to use a setRespnosePage at first since that was how I used it
> >>>>>on the "onSubmit" callbacks... but it did not redirect when I put it
> >>>>>in the constructor of this Start page.
> >>>>>
> >>>>>I used to play with struts a little and it had a "forward" tag which
> >>>>>allowed a forwarding of requests together with all the
> >>>>>parameters...which is essentially what I want to do.
> >>>>>
> >>>>>I would have thougth setResponsePage(new Page1(parameters)) could have
> >>>>>done the same thing.
> >>>>>
> >>>>>Josh
> >>>>>
> >>>>>
> >>>>>
> >>>>>On 7/16/05, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> >>>>>
> >>>>>
> >>>>>>I mean, setResponsePage.
> >>>>>>
> >>>>>>Eelco Hillenius wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>Actually, now that I look at it, it isn't even clear what
> >>>>>>>redirectToInterceptPage should do what can't be done with
> >>>>>>>setResponsePage. Idea's anyone? If we cannot find a good case - I
> >>>>>>>might have missed something - I think we should remove this method
> >>>>>>>from the API.
> >>>>>>>
> >>>>>>>Josh, have you tried using setResponse instead of
> >>>>>>>redirectToInterceptPage?
> >>>>>>>
> >>>>>>>Eelco
> >>>>>>>
> >>>>>>>
> >>>>>>>-------------------------------------------------------
> >>>>>>>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> >>>>>>>from IBM. Find simple to follow Roadmaps, straightforward articles,
> >>>>>>>informative Webcasts and more! Get everything you need to get up to
> >>>>>>>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> >>>>>>>_______________________________________________
> >>>>>>>Wicket-user mailing list
> >>>>>>>[email protected]
> >>>>>>>https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>-------------------------------------------------------
> >>>>>>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> >>>>>>from IBM. Find simple to follow Roadmaps, straightforward articles,
> >>>>>>informative Webcasts and more! Get everything you need to get up to
> >>>>>>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> >>>>>>_______________________________________________
> >>>>>>Wicket-user mailing list
> >>>>>>[email protected]
> >>>>>>https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>-------------------------------------------------------
> >>>>>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> >>>>>from IBM. Find simple to follow Roadmaps, straightforward articles,
> >>>>>informative Webcasts and more! Get everything you need to get up to
> >>>>>speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
> >>>>>_______________________________________________
> >>>>>Wicket-user mailing list
> >>>>>[email protected]
> >>>>>https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>>-------------------------------------------------------
> >>>>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> >>>>from IBM. Find simple to follow Roadmaps, straightforward articles,
> >>>>informative Webcasts and more! Get everything you need to get up to
> >>>>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> >>>>_______________________________________________
> >>>>Wicket-user mailing list
> >>>>[email protected]
> >>>>https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>-------------------------------------------------------
> >>>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> >>>from IBM. Find simple to follow Roadmaps, straightforward articles,
> >>>informative Webcasts and more! Get everything you need to get up to
> >>>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> >>>_______________________________________________
> >>>Wicket-user mailing list
> >>>[email protected]
> >>>https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>>
> >>
> >>
> >>
> >>-------------------------------------------------------
> >>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> >>from IBM. Find simple to follow Roadmaps, straightforward articles,
> >>informative Webcasts and more! Get everything you need to get up to
> >>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> >>_______________________________________________
> >>Wicket-user mailing list
> >>[email protected]
> >>https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> > from IBM. Find simple to follow Roadmaps, straightforward articles,
> > informative Webcasts and more! Get everything you need to get up to
> > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to