Skip to main content
Version: 11.2

aftergetmenu

note

This article is about the aftergetmenu UDB event handler.

aftergetmenu​

The aftergetmenu event may be called from web pages developed in Web Designer and processed by a USoft page engine service.

EventApplies toOccurs when
aftergetmenuPage objectsAfter each .getMenu() action

This event is triggered on the global UdbApplication singleton (via UdbApplication.trigger('aftergetmenu', ...)), after the client has parsed the server's response to a .getMenu() action. If the response contains menu data, the event is fired with the menu; if the response is empty or the action failed, the event is still fired, but with a null menu.

How to use​

Find or create an Event Listener object with Event Type = aftergetmenu. Event Listeners are in the Web Designer Controls catalog:

Insert the event listener into the Page object. Insert a callClientScript action into the event listener. Use this action's Script property to code the behaviour that you want to see when the event occurs.

You are implicitly associating the event with an event handler function. This function has an options parameter. For available options, see the Options section at the end of this help topic:

function(*event*, *options*){ ... }

Options​

When the event occurs, the following event handler function is called. You can use this function's options parameter in your event scripting.

function( *event*, *options* )

*event* ::= jQuery.Event
*options* ::= *event-options*

*event-options* ::= {
menu: *menu*,
menuName: *menuName*
}

Event contains the run-time details of the triggered event, of the event type stated above.

This syntax means that you can access an option by scripting:

options.*option*

Menu is the parsed menu structure returned by the .getMenu() action, or null if the response contained no menu data (e.g. an empty result or a failed action).

menuName is the name of the menu, or an empty string when menu is null.