On 12/23/13 10:42 AM, "Jason Guild" <jason.gu...@alaska.gov> wrote:

>Mark:
>
>Thanks for the reply.
>
>In your example, if firstTab were a reference to a composite component
>instance, how would that component delegate the setFocus() call to one
>of the child TextInputs within itself?
The component would need some strategy to decide what should get focus
when the component's setFocus gets called.  It could be the first child,
or some other logic, maybe a property set some where.  DataGrid, for
example, puts focus on one of its renderers if it is editable.  IIRC,
Alert puts focus on the default button.
>
>The dialog class has only a reference to the entire composite component,
>and the component in the dialog has no knowledge of whether it appears
>in a popup dialog or anywhere else.
IMHO, it shouldn't need to know that.  It is up to the consumer of the
composite component to decide whether to call that component's setFocus()
or not.

Reply via email to