• 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 09:21:50 -0800


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






_______________________________________________
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: Fred Shurtleff <email@hidden>
References: 
 >Direct Actions Question (From: Fred Shurtleff <email@hidden>)

  • Prev by Date: Direct Actions Question
  • Next by Date: Question about WORepetitions
  • Previous by thread: Direct Actions Question
  • Next by thread: Re: Direct Actions Question
  • Index(es):
    • Date
    • Thread