• 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: Direct Actions Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Direct Actions Question


  • Subject: Re: Direct Actions Question
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 7 Mar 2007 15:13:44 -0800


On Mar 7, 2007, at 1:23 PM, Fred Shurtleff wrote:

Chuck,

Thanks so much for opening my eyes for me. You are so correct in saying-

"It is important to actually read the _entire_ error message and not jump to conclusions based on a few words in the first line."

I think this is a common trap, since 1 error always triggers many downstream errors which in my case I overlooked.

Yes, many people seem to stop reading those exceptions messages too soon. You learned a valuable lesson today.



Even after focusing me on the WOImageButton problem, I had a difficult time finding WHERE this problem lied, because the main page did not have any such element. Turns out the home page was a partial component wrapped in a Template container having a Navigation form bar/component with a WOImageButton element - and this was lacking an actionClass/directActionName binding.

Yeah, _finding_ the cause of errors like this can be a huge pain.

Chuck



On Mar 7, 2007, at 9:17 AM, Fred Shurtleff wrote:

Hello,
I have ported an PBProj/Xcode application over to Eclipse. This application has been coded to use Direct Actions; however when I run this application it fails because it cannot resolve a default 'action class'.

No, you're wrong. You are mis-reading the error message. See below.


Following are the details.

Application.java sets direct actions as default:
WORequestHandler directActionRequestHandler = requestHandlerForKey("wa");
setDefaultRequestHandler(directActionRequestHandler);


DirectAction.java specifies the default action:
   public WOActionResults defaultAction() {
   return pageWithName("Main");

When I run the app, an ErrorPage is displayed(NOT Main page), and the Console displays the following error:

<com.webobjects.appserver._private.WODirectActionRequestHandler>: Exception while handling action named "default" on action class "null"

That means it found and ran the requested action.

:com.webobjects.foundation.NSForwardException [com.webobjects.appserver._private.WODynamicElementCreationException ] null

The real problem is a WODynamicElementCreationException


[2007-03-06 10:11:03 EST] <WorkerThread0> com.webobjects.foundation.NSForwardException for com.webobjects.appserver._private.WODynamicElementCreationException:
<com.webobjects.appserver._private.WOImageButton> 'Either a component action or a direct action must be specified.'

Somewhere in Main.wod you have a WOImageButton. It has neither the action or directAction binding set on it.



This error completely puzzles me because my understanding is that the 'defaultAction' method of 'DirectAction' class is called by the WebObjects framework when you first connect to the application. And this class is definitely present in the application, so I cannot understand why it is reporting an "action class "null", or in other words, is not recognizing the (bootstrap)DirectAction class.

It is important to actually read the _entire_ error message and not jump to conclusions based on a few words in the first line. If read (and thought about), the error messages are usually quite informative.



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












--

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


  • Follow-Ups:
    • Re: Direct Actions Question
      • From: "Jerry W. Walker" <email@hidden>
References: 
 >Direct Actions Question (From: Fred Shurtleff <email@hidden>)
 >Re: Direct Actions Question (From: Chuck Hill <email@hidden>)
 >Re: Direct Actions Question (From: Fred Shurtleff <email@hidden>)

  • Prev by Date: Re: WebObjects 5.3.3 DST and Linux
  • Next by Date: Re: Question about WORepetitions
  • Previous by thread: Re: Direct Actions Question
  • Next by thread: Re: Direct Actions Question
  • Index(es):
    • Date
    • Thread