Skip to content

Direct Actions

Hugi Thordarson edited this page Apr 15, 2019 · 3 revisions

A direct action is basically a method that can be invoked via a URL, returning a WOResponse.

Direct Actions are

  • methods contained within a class that inherits from WODirectAction
  • whose name ends with the string *Action

For example, a direct action that might return the string "Hello" to the user would read like this

public NGActionResults myAction() {
    NGResponse response = new NGResponse();
    response.setContent( "Hello" );
    return response;
}

Clone this wiki locally