pp108 : xforms-onafterzoom

xforms-onafterzoom


This event is fired before the zoom page is closed.

Event Information

To invoke

Bind a HTML control to the zoom. Open the zoom page and select the data that should be passed as zoom data. Close the zoom window by clicking OK button.

Default Action

Takes the data back to the page that called the zoom window, and initiates any action associated with this event.

Named Script

xforms-onafterzoom


Event Object Properties

Property

Description

srcElement

Denotes the object that fired the event. This points to the HTML control that initiated the zoom action and not the image from which the zoom is invoked.

businessObject

Object that denotes the business object of the row selected on the zoom window. The selection can be made by a single or double-click.

businessAttribute

Object that denotes the business element (XPath inside the business object) of the zoom field in the selected row. A row can be selected by single or double-click.

returnValue

Boolean that determines whether the zoom data will be set to the field that invoked the zoom page. By default, the value is True, which indicates that the zoom data will be set.

options

Collection that denotes the rows selected in the zoom window. One or more rows of data can be selected from the zoom window by selecting the corresponding check boxes of the rows. The following are items are present in the collection:

  • value: Value (data) from the zoom field on the current checked row
  • xml: Business attribute of the zoom field in the current checked row
  • businessObject: Business object of the current checked row



An event handler can access the event object and its properties through the eventObject available as a parameter on the handler.

Remarks


If no data is selected while zooming the page, then the business object and the business attribute remains NULL.

Example


This sample code demonstrates the event:

function afterZoom(eventObject) 
{ 
   var data = eventObject.businessAttribute; 
   if (! data) 
   { 
      alert("Value not selected"); 
      return; 
   } 
   alert("Value selected : " + cordys.getTextContent(data));
}

Applies to


Input, Output, Textarea, Code Snippet, Select, List