• 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 question about passing arguments into an WO app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie question about passing arguments into an WO app


  • Subject: Re: Newbie question about passing arguments into an WO app
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 22 Jan 2007 14:13:28 -0800


On Jan 22, 2007, at 1:32 PM, Seth Norris wrote:

Hi all,

I am new to WO - you may remember back in September I asked about what I should know when applying for a job that used WebObjects - well I got the job and now I have a lot to learn :)

Congrats!


Anyway, I am trying to figure out how to pass an argument in to a WO app. We have two different URLs that do a redirect to the app and I would like the layout to change a little based on which redirect(URL) the user came from. I have a boolean set up in the session and I have all the layout changes working based on that boolean, but I can't figure out how to set the boolean based on where the user came from when the app started. Can I even do this? Should I?

The easiest is to get the redirect to append a direct action path, e.g.

http://my.domain.com/cgi-bin/WebObjects/MyApp.woa/wa/sourceA
http://my.domain.com/cgi-bin/WebObjects/MyApp.woa/wa/sourceB

Then in DirectAction.sourceAAction() and DirectAction.sourceBAction () set the boolean in the session and return the first page.

A bit more flexible is to get the redirect to append a direct action path and a query string, e.g.

http://my.domain.com/cgi-bin/WebObjects/MyApp.woa/wa/default?source=A
http://my.domain.com/cgi-bin/WebObjects/MyApp.woa/wa/default?source=B

Then in DirectAction.defayultAction() use request().formValueForKey ("source") set the boolean in the session and return the first page.


Chuck


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Newbie question about passing arguments into an WO app (From: Seth Norris <email@hidden>)

  • Prev by Date: Re: WOBuilder in the future of WO?
  • Next by Date: Re: WOBuilder in the future of WO?
  • Previous by thread: Newbie question about passing arguments into an WO app
  • Next by thread: Eclips, .string files, and default encoding
  • Index(es):
    • Date
    • Thread