cancel
Showing results for 
Search instead for 
Did you mean: 

SetFocus on Controls within Components

I'm aware that it is a current know limitation of the SetFocus() function that it is unable to Set Focus to any Controls within a Component.

I therefore request that the ability to access the Controls within a Component is provided, such that I can SetFocus() on Controls within a Component.


For example, I have a Component called "cmpUserDetails". It features 2 Text Inputs; "txtFirstName" and "txtLastName". This Component is on Screen 1. 

Also on Screen 1 is the "Continue" button. When clicked, the validation on the 2 Text Inputs within the Component will run, to check that the Output Properties for each Text Input are not blank.

Ideally, if blank, I want to SetFocus to the Component that has failed validation that is closest to the top of the Screen.

 

Perhaps, we could access the actual Controls within the Components like so:
cmpUserDetails.txtFirstName such that in my validation code on the "Continue" button, I could set focus to the relevant field that has error'd, such as: SetFocus(cmpUserDetails.txtFirstName).

An Accessibility Perspective...

This is most useful from an accessibility perspective, whereby users that are using assistive technologies, such as screen-readers, can be placed in the upper most Control that has failed validation. Allowing them to then tab through the rest of the page (and errors).

Status: New