
Public Member Functions | |
| AjaxModalDialogOpener (WOContext context) | |
| void | appendToResponse (WOResponse response, WOContext context) |
| WOActionResults | handleRequest (WORequest request, WOContext context) |
| String | id () |
| boolean | isStateless () |
| String | modalDialogId () |
Static Public Member Functions | |
| static void | rejectOpen (WOContext context) |
Protected Member Functions | |
| void | addRequiredWebResources (WOResponse res) |
| NSMutableDictionary | ajaxRequestOptions () |
If you need to do some preparation before the dialog opens, use the action method.This is called synchronously so make it quick! The action method is useful for things like copying the item from a repetition to use in a dialog that is not nested in the repetition.
If you specify the elementName as a then the label binding can be used to specify the link, or you can use child elements. You can also specify the link's title using the title binding.
As the opener functions on the client only, it is possible for it to be rendered when enabled evaluates to true and clicked later when enabled would evaluate to false. This condition is checked for when the opener is clicked. If enabled evaluates to false at that time: the action method is not called, the AjaxModalDialog is not opened, and the onFailure handler (if any) is run.
dialogId required, ID of the AjaxModalDialog to open elementName the element that you want the open rendered as label only relevant if elementName is a: the text for the link that opens the dialog box, if this used the child elements are ignored. linkTitle only relevant if elementName is a: used as title attribute of link opening dialog title the Title to be displayed in the ModalBox window header, can override what the dialog was created with action, optional action to call before opening the modal dialog. enabled if false, nothing is rendered for this component. This can be used instead of wrapping this in a WOConditional. The default is true. onFailure optional JavaScript (not a function()!) to run if the opener is clicked and enabled evaluates to false. This can remove the element, show an alert, etc. e.g. onFailure = "alert('This is no longer available');";
id HTML id for the link class CSS class for the link style CSS style for the link
| AjaxModalDialogOpener | ( | WOContext | context | ) |
| void addRequiredWebResources | ( | WOResponse | res | ) | [protected, virtual] |
Override this method to append the needed scripts for this component.
| res |
Implements AjaxComponent.
| NSMutableDictionary ajaxRequestOptions | ( | ) | [protected] |
| void appendToResponse | ( | WOResponse | response, | |
| WOContext | context | |||
| ) |
Generate a link that opens the indicated dialog.
Reimplemented from AjaxComponent.
| WOActionResults handleRequest | ( | WORequest | request, | |
| WOContext | context | |||
| ) | [virtual] |
Runs action and returns success status if enabled, otherwise returns failed status.
Implements AjaxComponent.
| String id | ( | ) |
| boolean isStateless | ( | ) |
| String modalDialogId | ( | ) |
| static void rejectOpen | ( | WOContext | context | ) | [static] |
Call this, from the action method only, to prevent the dialog from opening. If there is an onFailure callback, it will get executed. This is also called internally if enabled is bound and evaluates to false. This method sets the response status code to an error code so that the onSuccess callback is not executed. The error status returned is 409 - "Conflict" which seemed like the best match for this.
| context | WOContext to reject open in |
1.5.8