Hi!

The constructor is an odd place for this.

The constructor is called from pageWithName(). That is in the request- response loop preceding the one that would actually use the component. If you already know at that point in time where you want to go and where not, you should modify the caller so that pageWithName() is called with the correct arguments.

There might nonetheless be situations where you may want to forbid viewing a certain page. E.g. it is a private page and you want a safety net just in case some day someone writes code that doesn't check access right before going to the page. For that I would code a check in the awake() method. If the check fails throw an exception. Optionally that exception could carry information on where to take the user. The exception handler in your Application class should take care of routing the user to the appropriate page.

Pierre

On Sep 5, 2007, at 2:41 AM, Baiss Eric Magnusson wrote:


I'm in the Constructor of a WOComponent sub-class and I realize I have to be in another page.

I invoke a new <pageWithName>, but then what?

----
Baiss Eric Magnusson
<http://www.Track-Your-Finances.com>
<http://www.CascadeWebDesign.com>


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects-lists%40houdah.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to