Skip to main content
Version: 11.2

afterrender

note

This article is about the afterrender UDB event handler.

afterrender​

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

EventApplies toOccurs when
afterrenderUI controls (any)Once, after the GUI realisation of the control has been completed

This event is dispatched from the shared, generic Vue mounted() lifecycle hook used by registerComponent() for every registered control class. It fires once per control, on mount, regardless of whether the control is single-record or multi-record. This is unlike renderrow, which is a separate event, specific to MultiRecordControl and its subclasses, that fires once per row rather than once per control. Note that the handler is called with a single USoftEvent('afterrender', {target, currentTarget}) argument — there is no separate options object with additional properties beyond target and currentTarget. A narrower, second trigger site also exists for the menu control (MenuControl), which re-fires a plain afterrender (with no payload) on its <ul> element after re-rendering the menu list.

How to use​

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

Insert the event listener into the UI control. 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.