Download

Get Loom

Confirmation

Indicates that the annotated event require some user confirmation before proceeding. There are two types of confirmation:

  • Confirmation: It must be confirmed each and every time.
  • Disclaimer: It must be confirmed once per user session.

Annotation

@RequiresConfirmation(id="leasingDisclaimer", type=ConfirmationType.DISCLAIMER)
public Resolution create() {
	// ...event method code...
}

Any annotated event will ask the user for confirmation before execution. If the user has javascript enabled, the confirmation will be displayed as a javascript modal window; else (if the user opens the link in a new tab or clicks a bookmark, which would skip the javascript processing) the request will display an intermediate page (/confirmation.jsp). This guarantees accessibility even when no javascript is available.

Javascript

Javascript confirmation dialogs are displayed using modalbox, but this can be overriden easily.

// bind for confirmation any link or submit button that are _not_ unauthorized
loom.ui.bindConfirmations($$('.confirmation:not(.unauthorized)'));

This would work for any confirmation link or submit button, but keep in mind that only GET requests are supported for server-side confirmation. POST confirmation requires javascript.