• 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: why WOActionResults instead of void ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why WOActionResults instead of void ?


  • Subject: Re: why WOActionResults instead of void ?
  • From: Chuck Hill <email@hidden>
  • Date: Sat, 24 Jan 2009 12:43:07 -0800


On Jan 23, 2009, at 3:08 PM, Amedeo Mantica wrote:

Hello, i see that in action in components thet returns the same page aome users do:

public void doSomeThing() {
	//your stuff
}

Properly, this is for Ajax actions. It works for component actions though some KVC magic which invents a null if it needs a result form a void method.



others do:

public WOActionResults doSomeThing() {

	//your stuff

	return null;
}

This is more proper but...


both seem to works equally....

is there some difference that i don't know?


They are both inferior to return context().page(). That is what the should do.

Chuck


-- Chuck Hill Senior Consultant / VP Development

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: 
 >why WOActionResults instead of void ? (From: Amedeo Mantica <email@hidden>)

  • Prev by Date: Re: W3C validation and ERXBatchNavigationBar
  • Next by Date: Proper way to install Eclipse/WOLips/Wonder
  • Previous by thread: why WOActionResults instead of void ?
  • Next by thread: Proper way to install Eclipse/WOLips/Wonder
  • Index(es):
    • Date
    • Thread