Re: Redirecting to another page in a WebPage constructor

2011-03-11 Thread vineet semwal
if he actually needs *redirection* then throw new ImmediateRedirectException(RedirectToPage.class,params); public class ImmediateRedirectException extends AbstractRestartResponseException{ public ImmediateRedirectException(Class pageClass,PageParameters params) { RequestCycle requ

Re: Redirecting to another page in a WebPage constructor

2011-03-10 Thread Maarten Billemont
On 10 Mar 2011, at 13:25, vineetsemwal wrote: > > use restartresponseexception While drf may not have meant what he said, RestartResponseException will not actually redirect to another page, it will just load the other page as a response to the current page's URL. That is often very confusing

Re: Redirecting to another page in a WebPage constructor

2011-03-10 Thread vineetsemwal
use restartresponseexception - vineet semwal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-to-another-page-in-a-WebPage-constructor-tp3345688p3345714.html Sent from the Users forum mailing list archive at Nabble.com

Redirecting to another page in a WebPage constructor

2011-03-10 Thread drf
In the constructor of a class which extends WebPage, is there a way to redirect to another page? setResponsePage() apparently will not work in a constructor. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-to-another-page-in-a-WebPage-constructor

Re: WebPage constructor

2008-10-15 Thread Nino Saturnino Martinez Vazquez Wael
Not because I want to hijact the thread.. But you could use a compound property model inorder to get rid of all the propertymodels.. jensiator wrote: Oh and to you that has read this thread looking for code examples. Here is my code for doing this. (Hope it's the right way of doing it) There is

Re: WebPage constructor

2008-10-15 Thread jensiator
opertyModel(personModel, "firstName"))); . PersonDetachedModel extends LoadableDetachableModel. It holds the personIdkey as a member. In the load method you fetch the data from db,webservice, rest whatever. Jens Alenius -- View this message in context: http://www.nabble.com/WebPage-constructor-tp19977659p1998

Re: WebPage constructor

2008-10-15 Thread jensiator
Thanks MÃ¥rten and Johan. Now I know what to do. Sometime you just need to discuss issues in wicket because there is not so many bestpractise aricticles. Like in the Struts Framework. But it will change in time... Jens -- View this message in context: http://www.nabble.com/WebPage-constructor

Re: WebPage constructor

2008-10-15 Thread Maarten Bosteels
ata some amount of labels > everytime > > the p > > > > > > Only when you have a bookmarkable url (or home page) and you press > > refresh in the browser you will get a new page. > > > > The url you refresh points to an existing page inst

Re: WebPage constructor

2008-10-15 Thread Johan Compagner
is just rendered again, so no page construction is being done then > > > -- > View this message in context: > http://www.nabble.com/WebPage-constructor-tp19977659p19988260.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > -

Re: WebPage constructor

2008-10-15 Thread jensiator
ain, so no page construction is being done then -- View this message in context: http://www.nabble.com/WebPage-constructor-tp19977659p19988260.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe,

Re: WebPage constructor

2008-10-14 Thread Igor Vaynberg
be like that (working with onrender instead at a > > > refresh). I've been searching the web for something about what to > expect > > of > > > the constuctor invokation but I cant find anything about it. Please > > point > > > me to an basic

Re: WebPage constructor

2008-10-14 Thread Ryan Gravener
ppossed to be like that (working with onrender instead at a > > refresh). I've been searching the web for something about what to expect > of > > the constuctor invokation but I cant find anything about it. Please > point > > me to an basic article about it if there is on. >

Re: WebPage constructor

2008-10-14 Thread Johan Compagner
like that (working with onrender instead at a > refresh). I've been searching the web for something about what to expect of > the constuctor invokation but I cant find anything about it. Please point > me to an basic article about it if there is on. > Jens > -- > View this mess

WebPage constructor

2008-10-14 Thread jensiator
refresh). I've been searching the web for something about what to expect of the constuctor invokation but I cant find anything about it. Please point me to an basic article about it if there is on. Jens -- View this message in context: http://www.nabble.com/WebPage-constr

Re: setResponsePage in a WebPage constructor

2007-11-23 Thread karnowski
that developers could run, but it seems I trimmed too much and the modified now-generic code no longer produces the issue. > Or do what Al said and throw a RestartResponseException. > This worked fine. -- View this message in context: http://www.nabble.com/setResponsePage-in-a-WebPage-

Re: setResponsePage in a WebPage constructor

2007-11-20 Thread Eelco Hillenius
> But I'm getting inconsistent results for different web pages. When the > validity check fails it always appears to call the "setResponsePage()" but > sometimes will display the DifferentPage in the browser (i.e. what I want) > but sometimes continues to display the OriginalPage (not what I want).

Re: setResponsePage in a WebPage constructor

2007-11-20 Thread Al Maw
karnowski wrote: Greetings, In the constructor of my webpages I'm wanting to do a validity check and if it fails redirect to a different page. So I'm doing something like this: public class OriginalPage extends WebPage { public OriginalPage() { ... if(!validityCheck()) { setResponsePage

setResponsePage in a WebPage constructor

2007-11-20 Thread karnowski
continues to display the OriginalPage (not what I want). Am I not supposed to be doing a setResponsePage() in a webpage's constructor? Is setResponsePage() only for form/ajax submission? How can I accomplish what I'm after here? cheers, David -- View this message in context: http://www.nabb