TabSheet and field focus

Hi!

  1. I have a tab sheet with two tabs.
  2. Second tab contains “TextField”
  3. When that tab selected (clicked), this field needs to be focused by default.
  4. Tab sheet has SelectedTabChangeListener defined and calls “.focus()” on the TextField when tab gets selected.

Of course it is
not working
. What exactly in my logic I am missing, why this field is not focused and what else needs to be done??? :wacko:

Just a guess: Make the textfield immediate.

Making the field immediate won’t affect the focusing, it only affects the events/changes sent back to the server being made without delay.

My guess is that the TabSheet itself somehow steals the focus for some reason to allow keyboard navigation of the tabs. Can you check from the debug console window that the focused component matches the textfield (PID)?

But the call to focus() on the serverside is a change that must be propagated towards the client, so my understanding is, that it would be affected by immediate also?!?? Or is it an exception from the rule?

Sorry for my unclear explanation. Immediate only affrcts events/changes coming from the client to the server.