Events are runtime activities associated with XPages and controls. For example, buttons have anonclickevent that occurs when the user clicks the button once. You can attach simple actions or scripts to an event. When the event occurs during runtime, any associated simple actions or scripts execute.
To manage events, see Setting events for controls and XPages.
Mouse events
Mouse events occur for controls that accept mouse clicks.
Event | When it occurs |
---|---|
onclick | Mouse is clicked once. |
ondblclick | Mouse is double-clicked. |
onmousedown | Mouse button is pressed down. |
onmousemove | Mouse cursor moves. |
onmouseout | Mouse cursor leaves target. |
onmouseover | Mouse cursor moves over the target. |
onmouseup | Mouse button is released. |
Focus events
Focus events occur for controls that accept focus.
Event | When it occurs |
---|---|
onblur | Focus is moved away from the target. |
onfocus | Focus is set on the target. |
Select and change events
Select and change events occur for controls where text can be selected or values can be changed.
Event | When it occurs |
---|---|
onselect | Text in the target is selected. |
onchange | A value on an XPage changes. |
Key events
Key events occur for controls where keystrokes are accepted.
Event | When it occurs |
---|---|
onkeydown | A key is pressed. |
onkeypress | A key is pressed or held down. |
onkeyup | A key is released. |
XPage events
XPage events occur for XPages and allow only server-side scripts.
Event | When it occurs |
---|---|
afterPageLoad | After an XPage is loaded. |
afterRenderResponse | After a response is rendered. |
afterRestoreView | After a view is restored. |
beforePageLoad | Before an XPage is loaded. |
beforeRenderResponse | Before a response is rendered. |
beforeRestoreView | Before a view is restored. |
Document events
Document events occur for data documents and allow only server-side scripts.
Event | When it occurs |
---|---|
computeDocument | When a document is computed or recomputed. |
postNewDocument | After a document is created. |
postOpenDocument | After a document is opened. |
postSaveDocument | After a document is saved. |
queryNewDocument | Before a document is created. |
queryOpenDocument | Before a document is opened. |
querySaveDocument | Before a document is saved. |
View events
View events occur for views and allow only server-side scripts.
Event | When it occurs |
---|---|
postOpenView | After a view is opened. |
queryOpenView | Before a view is opened. |