• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Newbie] Setting default page
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >[Newbie] Setting default page (From: Lucas Haley <email@hidden>)

  • Prev by Date: RE: Credit Card Number Encryption
  • Next by Date: Fetching from related object
  • Previous by thread: [Newbie] Setting default page
  • Next by thread: Re: [Newbie] Setting default page
  • Index(es):
    • Date
    • Thread