Tapestry 5
  1. Tapestry 5
  2. TAP5-650

Enhance form autofocus to accept fieldname as a value

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.3
    • Fix Version/s: 5.3
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      It's not difficult to set autofocus=false and add $('myField').activate(); yourself, but I think it would address many of the issues people are having with autofocus if the parameter would also accept a field name instead of simply a boolean value so you can set the focus to field you like.

        Issue Links

          Activity

          Hide
          Massimo Lusetti added a comment -

          Applied as a mixin to the form component

          Show
          Massimo Lusetti added a comment - Applied as a mixin to the form component
          Hide
          Hudson added a comment -

          Integrated in tapestry-trunk-freestyle #479 (See https://builds.apache.org/job/tapestry-trunk-freestyle/479/)
          TAP5-650 Enhance form autofocus to accept fieldname as a value

          Actually a new mixin is used to bind to the Field from the Form which will receive the focus
          The most difficult part was to find a reliable way for Selenium to get the current focused HTML element

          mlusetti : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1157371
          Files :

          • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormFieldFocus.java
          • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
          • /tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormFieldFocusDemo.tml
          • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormFieldFocusDemo.java
          • /tapestry/tapestry5/trunk/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/FormFieldFocusTest.groovy
          Show
          Hudson added a comment - Integrated in tapestry-trunk-freestyle #479 (See https://builds.apache.org/job/tapestry-trunk-freestyle/479/ ) TAP5-650 Enhance form autofocus to accept fieldname as a value Actually a new mixin is used to bind to the Field from the Form which will receive the focus The most difficult part was to find a reliable way for Selenium to get the current focused HTML element mlusetti : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1157371 Files : /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormFieldFocus.java /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java /tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormFieldFocusDemo.tml /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormFieldFocusDemo.java /tapestry/tapestry5/trunk/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/FormFieldFocusTest.groovy

            People

            • Assignee:
              Massimo Lusetti
              Reporter:
              Kalle Korhonen
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development