Write your own header contributor that takes a model as a parameter and generates the meta tag for you. See the JS and CSS header contributors for inspiration.
Hint: if you're generating links to within your app, you could also take a Class and PageParmeters rather than a model and generate the URL from those. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 11, 2009 at 5:38 PM, Major Péter <majorpe...@sch.bme.hu> wrote: > Thanks for the quick response. > > I modified the html code like this: > <html xmlns:wicket> > <wicket:head> > <title>title</title> > <META http-equiv="refresh" content="5;URL=http://linktosomewhere"> > </wicket:head> > <body> > <wicket:extend>blah blah</wicket:extend> > </body> > </html> > > It works fine, but now the URL is burned into the html. Is there a way to > make the link some way to depends on a Model? > //It would be just a prettier solution to the problem. > > Thanks, > Peter > > Jeremy Thomerson írta: > > Just output a meta tag in your custom page that tells the browser to go to >> a >> different URL after 5 seconds. >> >> -- >> Jeremy Thomerson >> http://www.wickettraining.com >> >> >> On Wed, Mar 11, 2009 at 5:20 PM, Major Péter <majorpe...@sch.bme.hu> >> wrote: >> >> >> >>> Hi all, >>> >>> I would like to create a custom PageExpired ErrorPage, which contains >>> some >>> message and after 5 secs it redirects to the Homepage. I found >>> RedirectPage >>> to solve this, but when I extend it, it won't contain the design elements >>> which are now in a custom WebPage class. I could make on the same >>> principal >>> a custom RedirectPageTemplate, but then it would be just >>> code-duplicating... >>> That's why I tried to open the original RedirectPage class and copied >>> the >>> contents of it, but it doesn't want to work. >>> Can someone help me? What am I doing wrong? >>> //Or is there other way to solve the problem? >>> //Does it need other modifications in other files? >>> >>> The Java code is: >>> public final class PageExpiredError extends CustomWebPage { >>> >>> public PageExpiredError() { >>> super(); >>> final WebMarkupContainer redirect = new >>> WebMarkupContainer("redirect"); >>> final String content = 5 + ";URL=" + new >>> GroupHierarchy().urlFor(IRedirectListener.INTERFACE); >>> redirect.add(new AttributeModifier("content", new Model(content))); >>> add(redirect); >>> } >>> } >>> >>> If I'm using the setRedirect(true); command, Firefox gives me a Redirect >>> Loop Error.. >>> >>> I don't think the html code is relevant in this case. >>> Thanks. >>> >>> Best Regards, >>> Peter Major >>> >>> >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >