首页 XPage 事件(Events)
文章
取消

XPage 事件(Events)

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.

EventWhen it occurs
onclickMouse is clicked once.
ondblclickMouse is double-clicked.
onmousedownMouse button is pressed down.
onmousemoveMouse cursor moves.
onmouseoutMouse cursor leaves target.
onmouseoverMouse cursor moves over the target.
onmouseupMouse button is released.

Focus events

Focus events occur for controls that accept focus.

EventWhen it occurs
onblurFocus is moved away from the target.
onfocusFocus 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.

EventWhen it occurs
onselectText in the target is selected.
onchangeA value on an XPage changes.

Key events

Key events occur for controls where keystrokes are accepted.

EventWhen it occurs
onkeydownA key is pressed.
onkeypressA key is pressed or held down.
onkeyupA key is released.

XPage events

XPage events occur for XPages and allow only server-side scripts.

EventWhen it occurs
afterPageLoadAfter an XPage is loaded.
afterRenderResponseAfter a response is rendered.
afterRestoreViewAfter a view is restored.
beforePageLoadBefore an XPage is loaded.
beforeRenderResponseBefore a response is rendered.
beforeRestoreViewBefore a view is restored.

Document events

Document events occur for data documents and allow only server-side scripts.

EventWhen it occurs
computeDocumentWhen a document is computed or recomputed.
postNewDocumentAfter a document is created.
postOpenDocumentAfter a document is opened.
postSaveDocumentAfter a document is saved.
queryNewDocumentBefore a document is created.
queryOpenDocumentBefore a document is opened.
querySaveDocumentBefore a document is saved.

View events

View events occur for views and allow only server-side scripts.

EventWhen it occurs
postOpenViewAfter a view is opened.
queryOpenViewBefore a view is opened.
本文由作者按照 CC BY 4.0 进行授权