• 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: Intercepting a failed action method invocation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intercepting a failed action method invocation


  • Subject: Re: Intercepting a failed action method invocation
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 12 Jul 2016 02:52:26 +0000
  • Thread-topic: Intercepting a failed action method invocation

Meh!  Yes!   It has an “optimization” if the form was submitted.    Usually the request handler is what translates null into the page.

 

Chuck

 

 

From: Paul Hoadley <email@hidden>
Date: Monday, July 11, 2016 at 6:50 PM
To: Chuck Hill <email@hidden>
Cc: WebObjects-Dev <email@hidden>
Subject: Re: Intercepting a failed action method invocation

 

Hi Chuck,

 

On 12 Jul 2016, at 10:20 AM, Paul Hoadley <email@hidden> wrote:

 

On 12 Jul 2016, at 1:25 AM, Chuck Hill <email@hidden> wrote:

 

Just override invokeAction() and if the result is null then no action matched the URL.  That is your queue to set a conditional boolean to cause the informational message to be shown.

 

Override invokeAction() in the page-level component? When I do this:

 

@Override

public WOActionResults invokeAction(WORequest request, WOContext context) {

WOActionResults result = super.invokeAction(request, context);

System.out.println("invokeAction: result = " + result);

if (result == null) {

// Do something...

}

return result;

}

 

result comes back as an instance of the page component when the action method is not invoked, not null. Any clues?

 

Oh, hold on—this does appear to work for a WOHyperlink in my minimal test app. Have I incorrectly assumed a WOHyperlink (the example in my original post) and a WOSubmitButton (what I’m actually using) would work the same way here?

 

 

-- 
Paul Hoadley
http://logicsquad.net/



 

 _______________________________________________
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: 
 >Intercepting a failed action method invocation (From: Paul Hoadley <email@hidden>)
 >Re: Intercepting a failed action method invocation (From: Chuck Hill <email@hidden>)
 >Re: Intercepting a failed action method invocation (From: Paul Hoadley <email@hidden>)
 >Re: Intercepting a failed action method invocation (From: Paul Hoadley <email@hidden>)

  • Prev by Date: Re: Intercepting a failed action method invocation
  • Next by Date: Ajax request, ERXRedirect and ERXThreadStorage
  • Previous by thread: Re: Intercepting a failed action method invocation
  • Next by thread: ERXDisplayGroup vs insertNewObjectAtIndex
  • Index(es):
    • Date
    • Thread