I'm popping a form in a window to allow for populating a data table. Everything is pretty straight forward. What I have done is create an "Add" button on the window to generate a new fieldset in the form. Now all this works fine. What I'm having problems understanding is how do I set the user's focus to the newly added fieldset (and/or the first field in the field set).
I am aware that I can use defaultButton on windows, but it doesn't seem to address this problem because I've already got the window open and I'm dynamically adding fieldsets. Does anyone know of a solution for this?
For completeness, this is how I'm adding the fieldset to the form.
Code:
...
//this is the formpanel
//build up var newFieldSet...
this.add(newFieldSet);
if(this.rendered) {
this.doLayout();
}
...