Hi Guys,
I'm thinking what I want to do doesn't exist. The defaultFocus config for Window has a Getter but no Setter method. Is there anyway to alter what field will get focus dynamically, as I'm sending Window/form to show?
I've got code hiding the field in defaultFocus config under certain data condition, I then want to set focus on a field in a conditional fieldset. I'm using focus() on the field I want but Extjs just sets focus on the field proceeding the one I'm hiding. Disable() and hide() behave same way, just sets focus on field before it. And strangely, it's not even the first input field on form.
I have code from examples in past where, after server post returns field in error and the error msg, the code retrieves Field object in variable and runs markInvalid function to set the red outline. It then calls the focus() method on that field but I've never seen it work. I'm guessing at prior version of Extjs (2 or 3) this may of worked. So thinking it is same problem I'm asking about above.
I'm thinking what I want to do doesn't exist. The defaultFocus config for Window has a Getter but no Setter method. Is there anyway to alter what field will get focus dynamically, as I'm sending Window/form to show?
I've got code hiding the field in defaultFocus config under certain data condition, I then want to set focus on a field in a conditional fieldset. I'm using focus() on the field I want but Extjs just sets focus on the field proceeding the one I'm hiding. Disable() and hide() behave same way, just sets focus on field before it. And strangely, it's not even the first input field on form.
I have code from examples in past where, after server post returns field in error and the error msg, the code retrieves Field object in variable and runs markInvalid function to set the red outline. It then calls the focus() method on that field but I've never seen it work. I'm guessing at prior version of Extjs (2 or 3) this may of worked. So thinking it is same problem I'm asking about above.

Comment