Hi all:
I have a reusable component that consists of many TextInputs that make
up a mailing address form. When I use this component inside of a popup
dialog I want to give focus to the first focusable component within the
address form.
What is the best way to do this in the dialog so that I don't have to
hardcode setFocus() on any of the particular fields within the address
form? Does the address form component implement IFocusManagerComponent?
If so, what is the recommended way of delegating focus within the
address form
component? Do I override UIComponent.focusInHandler() in the composite
component and call setFocus() on one of the child TextInputs?
Ideally, in my dialog I would simply call addrForm.setFocus() when it is
shown and the address form would decide which of the sub-components
should receive the focus. Any help on gotchas or other details I need to
account for are greatly appreciated.
Thanks,
Jason
I have a reusable component that consists of many TextInputs that make
up a mailing address form. When I use this component inside of a popup
dialog I want to give focus to the first focusable component within the
address form.
What is the best way to do this in the dialog so that I don't have to
hardcode setFocus() on any of the particular fields within the address
form? Does the address form component implement IFocusManagerComponent?
If so, what is the recommended way of delegating focus within the
address form
component? Do I override UIComponent.focusInHandler() in the composite
component and call setFocus() on one of the child TextInputs?
Ideally, in my dialog I would simply call addrForm.setFocus() when it is
shown and the address form would decide which of the sub-components
should receive the focus. Any help on gotchas or other details I need to
account for are greatly appreciated.
Thanks,
Jason