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

Intercepting a failed action method invocation


  • Subject: Intercepting a failed action method invocation
  • From: Paul Hoadley <email@hidden>
  • Date: Mon, 11 Jul 2016 17:10:15 +0930

Hello,

I have a page structure where a form submit button is conditionally rendered based on some property of an EO. Sometimes the page will be returned such that the submit button is displayed, but meanwhile the value of the property changes behind the page’s back. At this point, clicking on the submit button doesn’t invoke the action method, but returns the same page (now with the submit button excluded by the conditional). It’s just as easy to demonstrate this with a WOHyperlink—the behaviour is the same:

    <wo:if condition="$showLink">
      <div>
        <wo:link action="$linkAction">Link!</wo:link>
      </div>
    </wo:if>

Then:

private boolean showLink = true;

public boolean showLink() {
if (showLink) {
showLink = false;
return true;
}
return showLink;
}

public WOActionResults linkAction() {
System.out.println("Main.linkAction: CALLED");
return null;
}

The hyperlink is rendered on initial page load, but then never again, and the action method is never called in response to clicking the hyperlink displayed on initial load.

I think this behaviour is quite reasonable, but I want to intercept it so that I can add an informational message to the page that explains what’s going on. Is there an obvious way to do this?


-- 
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

  • Follow-Ups:
    • Re: Intercepting a failed action method invocation
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Horizontal inheritance to splitting big database tables to speed up?
  • Next by Date: ERXDisplayGroup vs insertNewObjectAtIndex
  • Previous by thread: Re: fspec qualifier documentation?
  • Next by thread: Re: Intercepting a failed action method invocation
  • Index(es):
    • Date
    • Thread