Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

setFocus: Public JS API for control actions

Updated on April 6, 2017

setFocus

Sets focus on a field identified by the target property.

Syntax

var options = {
target: “Page1.prop1 ",
rowIndex: {value: "Page2.prop2", isProperty: true },
event: eventObject
};

pega.api.ui.actions.setFocus(options);

Parameters

This API accepts a JavaScript object which can have the following key-values:

target: The fully qualified property name for the field that gets focused. If there are multiple fields with the same property reference, the first visible field gets focus. This is not required when setting focus to a row of active grid.

rowIndex: Optional. The row index when grid rows should be focused. When the index is set, the target is the data source associated with the grid whether it is a clipboard page, report definition or a data page. The index can be a constant or the name of property, the value of which indicates the index. When providing a constant value you can provide a numeric index or use keywords such as first or last.

event: Optional. The event refers to a DOM eventObject. This is required when setting focus on a grid row.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us