I have successfully set the focus on a text field in a Modal window but
after it is closed and re-opened it no longer sets the focus to that
field. If I reload the whole parent page it will work once but again If
the modal window is closed and re-opened same problem. I have tried all
of these with the same result:
target.appendJavascript("document.findRepform.searchString.focus();");
target.focusComponent(((FindRepDetailsPanel)selectModalWindow.get("conte
nt")).get("findRepform:searchString"));
((FindRepDetailsPanel)selectModalWindow.get("content")).get("findRepform
:searchString").add(new DefaultFocusBehavior())
Any ideas?
Thanks
Mike