I think maybe for now it would be enough to mention in javadoc something like if you want to do redirect from page contructor use the redirectTo instead of setResponsePage.

btw. setResponsePage doesn't work in onBeginRequest too. One hack to get it work coud be to check in setResponsePage what listener and target object is specified, and if it is IRedirectListener and target object is a page (not a component) or no listener is specified at all (page creation), setResponsePage would just call redirectTo. But this may just be too ugly :)

-Matej

Eelco Hillenius wrote:
Matej Knopp 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.



Yeah. And that's exactly where the problem is... it is difficult to implement without a hack, as the response page is set after the constructor is called (quite natural as we can't set the page when it is not even constructed...).

I'll leave it for now then, though I want to build in a little bit more debugging.

Eelco


-Matej




-------------------------------------------------------
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

Reply via email to