Atli,
could you try to put your signin logic earlier in invokeAction ?
In the request /response loop , you would be more comfortable to
decide which page to choose for the response, see :
public WOActionResults invokeAction(WORequest aRequest,WOContext
aContext)
I think it's too late, in appendToResponse, you can only append and
not replace by another one. ( perhaps it's possible , but i don't
remember )
HTH,
Stephane
Le 2 févr. 09 à 13:38, Atli Páll Hafsteinsson a écrit :
Hi guys
In my attempt to make a user signin mechanism I override
appendToResponse in a component that wrappes every page in my app
and check if the user is signed in and if not try to display the
content of my login page (the login page is not wrapped), code:
public void appendToResponse( WOResponse response, WOContext
context ) { logger.debug( "Entering appendToResponse in
ApplicationLook" ); WOComponent currentPage = context.page
(); if( (((Session)session()).user() == null) && !
(currentPage instanceof Login) ) { logger.debug( "Not
logged in, showing login page" ); Login loginPage =
pageWithName( Login.class ); WOResponse r =
loginPage.generateResponse(); System.out.println
( r.contentString() ); super.appendToResponse( r,
context ); } else { super.appendToResponse
( response, context ); } }
This does not work, r.contentString() indeed has the content of the
login page but nothing is delivered to the browser, just an empty
page.
Any ideas??
Regards,
Atli
Fyrirvari á tölvupósti / e-mail disclaimer
http://us.is/Apps/WebObjects/US.woa/wa/dp?id=3776
_______________________________________________
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/
stephane.guyot11%40wanadoo.fr
This email sent to [email protected]
IBCM : International Bank of Chatenay-Malabry http://www.kiva.org/
lender/stephane4127 - Click on Map View
_______________________________________________
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]