pp108 : onbeforefind

onbeforefind


This event is fired before business object(s) is searched by clicking on the Find Button.

Syntax

DesignTime This is a design-time property and can be set through the property sheet of the control.


Event Information

To invoke Click the Find button on the pagination bar.
Default Action Initiates any action associated with this event.
Named Script onbeforefind


Event Object Properties


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

Property Description
Parameters This is an array containing the list of parameters to be shown in the Find dialog. If you do not set any value to this array, then the parameters defined in the Get method will be displayed in the Find dialog.Parameters refer to named objects. The current object supports the following parameters:
parameter Refers to the request parameter that is a part of the request.
description Label of the request parameter.
value Value of request parameter.
enabled If set as "true", the parameter field is enabled in the Find dialog.
hidden If set as "true", the parameter field is hidden in the Find dialog.
displayformat Refers to the display format of the parameter. It depends on the data type.
datatype Data type of the parameter.
returnValue Boolean that denotes whether the Find operation should be continued or not. To cancel the event, user can set the value of this property to false.
true Default. Find operation should be continued.
false Find operation should not be continued.
srcElement Reference to the Find button.


Remarks


The result of the getAllOptions() and getSelectedOptions() methods can be the options collection.

Example


This sample code demonstrates how the method can be used.

//The following example demonstrates the customization of the "displayformat"
		parameter of the "date" data type:
			function navFind1_BeforeFind(eventObject)
				 {
				    var aParameters = new Array()
				    //Set the data type and display format for "fromBirthDate" and "toBirthDate"
				    aParameters[0] = {parameter:"fromBirthDate",
	      description:"fromBirthDate", value:"", datatype:"date",
	 		   	enabled:true , hidden:false, displayformat:"shortdate longtime"};				
  			   aParameters[1] = {parameter:"toBirthDate",
 				   description:"toBirthDate", value:"", datatype:"date",
 				   enabled:true , hidden:false, displayformat:"shortdate longtime"};			
  			   eventObject.parameters = aParameters;				
  	 }

Applies to


Pagination Bar

Related reference

Navigator
Control Bar