• 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
Invoking a component with arguments in WOD
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Invoking a component with arguments in WOD


  • Subject: Invoking a component with arguments in WOD
  • From: "Lachlan Scott" <email@hidden>
  • Date: Wed, 19 Sep 2007 10:15:22 +1200
  • Thread-topic: Invoking a component with arguments in WOD

In our application, we have a log in component which adds a User object
to the Session if the supplied credentials are correct.

For testing purposes, we use a 'component menu' component which displays
a list of available components, and provides action methods to display
them individually.

We can write an action method in the menu to do a login and then display
the component, like this (pseudo code)

Public WOComponent doLoginAndCallNewPage(){
	// do usual login stuff
	// return the actual page we want
}

Which is all well and good, but feels clumsy, and hard codes the login
variables. I wondered if we couldn't somehow call the desired page and
address its user variable from the WOD, something like this:

MyWebObjectName : MyDesiredComponentName {
	user = <some construct to set a User to this variable>;
}

Or if there wasn't some other, more elegant approach list members might
suggest.

Also, is there an instructional resource on using WOD in this sort of
way, please?


Many thanks



Lachlan
 _______________________________________________
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

  • Follow-Ups:
    • Re: Invoking a component with arguments in WOD
      • From: Lachlan Deck <email@hidden>
  • Prev by Date: Re: Creating new object results in an out of memory error
  • Next by Date: Open Source Plot.framework
  • Previous by thread: Re: Creating new object results in an out of memory error
  • Next by thread: Re: Invoking a component with arguments in WOD
  • Index(es):
    • Date
    • Thread