Re: [Newbie] Setting default page
Re: [Newbie] Setting default page
- Subject: Re: [Newbie] Setting default page
- From: David LeBer <email@hidden>
- Date: Fri, 23 Apr 2004 18:17:22 -0400
On 23-Apr-04, at 5:40 PM, Lucas Haley wrote:
Hello all --
I'm new to WebObjects, coming in from PHP. I have the Joshua Marker
QuickPro book, and have been working my way through it. I have a
couple of questions, and would love some help:
1) how does one change the default page? On page 300 of the Marker
book, it says to change the DirectAction.java method defaultAction to
the name of the component to use. I've tried tthis, and it doesn't
seem to work -- it always uses main.wo. Am I missing something?
Have you changed the default request handler for your application to
the DirectAction one:
//In your Application Constructor
String directActionRequestHandlerKey =
this.directActionRequestHandlerKey();
WORequestHandler directActionRequestHandler =
this.requestHandlerForKey(directActionRequestHandlerKey);
this.setDefaultRequestHandler(directActionRequestHandler);
2) After being in PHP for a bit, I'm quite used to passing arguments
using key/value pairs in the URL. I think you can do this in WO using
DirectActions, but is it recommended? I'd love to be able to link to
an item in a catalogue directly, but yet be able to change the page's
content depending upon the user logged in.
Yes, that is a fine use for a DirectAction.
;david
--
David LeBer
Codebase Software Systems
site: http://www.codebase.ca
blog: http://david.codebase.ca
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.