It is simple and easy. I like it. It is not exactly a component but
think this exception makes sense.

Juergen

On 4/22/05, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> Actually, I think it would make a nice API addition. We could have a
> 'redirect page' packaged with Wicket (you'd never have to use it
> directly), and you call redirectTo("www.google.com"). The string arg
> redirectTo, would then do the trick a described below.
> 
> Devs, what do you think of that?
> 
> Eelco
> 
> 
> Eelco Hillenius wrote:
> 
> > I'd go for either the option that Jonathan suggested (providing your
> > own Panel for a node), or - just as easy - create a special Page, that
> > has the redirect in it:
> >
> > <html>
> > <head>
> > <meta wicket:id="redirect" http-equiv="refresh" content="0; url=app">
> > </head>
> > </html>
> >
> > On this page, you add:
> >
> >        WebMarkupContainer redirect = new WebMarkupContainer("redirect");
> >        redirect.add(new AttributeModifier("content", new Model("0;
> > url=http://www.google.com";)));
> >        add(redirect);
> >
> > One other trick, and I am *not* recommending this, but if you want to
> > redirect to a resource outside Wicket but within the same server, you
> > could use:
> >
> >        HttpServletRequest httpServletRequest =
> > ((WebRequest)getRequest()).getHttpServletRequest();
> >        HttpServletResponse httpServletResponse =
> > ((WebResponse)getResponse()).getHttpServletResponse();
> >        RequestDispatcher dispatcher =
> > httpServletRequest.getRequestDispatcher("/otherstuff.jsp");
> >        dispatcher.forward(httpServletRequest, httpServletResponse)
> >
> > Though I think the first option is much better.
> >
> > Regards,
> >
> > Eelco
> >
> > Jonathan Locke wrote:
> >
> >>
> >> eelco is Mr. Tree, so i'm guessing... but try overriding
> >> Tree.newNodePanel() and in that method create a panel with an
> >> ordinary ExternalLink (see Linkomatic example) in it.  make sense?
> >>
> >> bin zhu wrote:
> >>
> >>> how do i redirect to outside of wicket?
> >>> for example, i want to go to an external link when the
> >>> user clicks on a tree node
> >>>
> >>> redirectTo only accepts Page objects. should i create
> >>> an ExternalPage object that can redirect calls ? ie..
> >>> redirectTo( new ExternalPage("http://www.google.com";)
> >>> );
> >>>
> >>> thanks,
> >>>
> >>> bin
> >>
> >>
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: New Crystal Reports XI.
> > Version 11 adds new functionality designed to reduce time involved in
> > creating, integrating, and deploying reporting solutions. Free runtime
> > info,
> > new features, or free trial, at: http://www.businessobjects.com/devxi/728
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to