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
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
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
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
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
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
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
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
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.
>
>
> -
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,
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
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.
>
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
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
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-
> 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).
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
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
18 matches
Mail list logo