Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-2633

AjaxEditableLabel fails to focus editor upon validation errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.5
    • 1.4.6, 1.5-M1
    • wicket-extensions
    • None

    Description

      hi all,

      the AjaxEditableLabel's #onError implementation fails to properly focus the editor. The problem is the javascript appended to the ajax request target; replacing the lines 460 - 462 in AjaxEditableLabel with the the below code fixes the problem.

      target.appendJavascript("{var el=wicketGet('" + editor.getMarkupId() + "'); el.select(); el.focus();}");
      

      a workaround is to subclass AjaxEditableLabel and overide the #onError method.

      many thanks in advance,
      pete.

      Attachments

        Activity

          People

            jdonnerstag Juegen Donnerstag
            pnovotnik Petr Novotník
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: