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

Re: Invoking a component with arguments in WOD


  • Subject: Re: Invoking a component with arguments in WOD
  • From: Lachlan Deck <email@hidden>
  • Date: Fri, 21 Sep 2007 13:32:19 +1000

Hi Lachlan,

On 21/09/2007, at 12:53 PM, Lachlan Scott wrote:

-----Original Message-----

Actually why not do this?
MyWebObjectName : MyDesiredComponentName {
	user = session.user;
}

This is what I thought I wanted to do, thanks.

Can you clarify if this below would be a true and generic version of
what you've suggested for those of us feeling small of brain ;-}

It's a very useful thing to do. If your custom component returns true (the default) for synchronizesVariablesAndBindings then you just need public setters/getters for 'user' for example. Otherwise, you can do away with the setter and do as I suggested before:


public User user() {
	if ( _user == null )
		_user = ( User )valueForBinding( "user" );
	return _user;
}

ie. Can I do this sort of thing generally with WOD?
MyWebObjectName : MyDesiredComponentName {
 	publicVariableInMyDesiredComponentName = someValueIWishToPass;
 }

Yes.

Finally, is there any related Apple or other doco I can read that
deccribes WOD usage generically?

It can be helpful to look through the example custom components: - /Developer/Examples/JavaWebObjects/Frameworks/ - /Developer/Examples/JavaWebObjects/Source/JavaWOExtensions - /Developer/Examples/JavaWebObjects/WOExamples - Project Wonder's ERExtensions

Don't forget to read the javadocs for WOComponent and it's superclasses.

But as for actual instructional/point-by-point documentation. It can be helpful to go back and look at the legacy docs where they listed actual programming topics -- who knows why they've not kept them handy with the new pages :-/ (Yes, I've filed a bug a loong time ago)

Case in point... diminishing returns...
1) http://developer.apple.com/documentation/LegacyTechnologies/ WebObjects/WebObjects_4.5/webobjects.html
- See WebObjects Tools and Techniques
- See Programming Topics (e.g., Extending WebObjects Framework)


2) http://developer.apple.com/documentation/LegacyTechnologies/ WebObjects/WebObjects_5/webobjects.html
- See Programming Topics (e.g., Extending WebObjects Framework)


3) http://developer.apple.com/referencelibrary/DeveloperTools/ idxWebObjects-date.html
- not there :-/


The Other Lachlan

:-))

with regards,
--

Lachlan Deck
_______________________________________________
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: 
 >Invoking a component with arguments in WOD (From: "Lachlan Scott" <email@hidden>)
 >Re: Invoking a component with arguments in WOD (From: Lachlan Deck <email@hidden>)
 >Re: Invoking a component with arguments in WOD (From: Johann Werner <email@hidden>)
 >Re: Invoking a component with arguments in WOD (From: Lachlan Deck <email@hidden>)
 >RE: Invoking a component with arguments in WOD (From: "Lachlan Scott" <email@hidden>)

  • Prev by Date: Re: Unable to locate WOOpenURL
  • Next by Date: Re: Unable to locate WOOpenURL
  • Previous by thread: RE: Invoking a component with arguments in WOD
  • Next by thread: Weird EOExceptions
  • Index(es):
    • Date
    • Thread