3 Replies Latest reply on Nov 4, 2008 5:36 PM by Nick Belaevski

    Setting focus to element outside of current form

    Tony Gedge Newbie

      Is it possible to use the focus attribute of an a4j:xxx element to set the focus to an element not in the submitted form?

      I have a page which has a form (form A) containing some data being edited. From this form, a modal dialog is shown which uses a different form (form B) to perform its work. I want to have a a4j:commandButton invoked from form B that, on completion, pops down the modal dialog and sets the focus to an element in form A.

      From what I can see in the debug, this doesn't appear to be possible:

      debug[11:43:37,729]: focus must be set to control nocForm:registration_view:damagesClaim_matter_claimantSolicitor_pick
      debug[11:43:37,729]: No control element nocForm:registration_view:damagesClaim_matter_claimantSolicitor_pick in submitted form
      debug[11:43:37,729]: Set focus to control
      


      Is there an alternative way to do this?