Tapestry 5
  1. Tapestry 5
  2. TAP5-994

Field autofocus should be done via Tapestry.init instead of using $ function

    Details

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

      Description

      As said in the title, field autofocus should be done using the classical tapestry.js model, i.e. using Tapestry.init() and Tapestry.Initializer.Autofocus .

      Currently, the output produced looks like
      $('textfield').activate();

      It is Prototype specific and prevent from migrating to another JS library.

        Activity

        Robin Komiwes created issue -
        Robin Komiwes made changes -
        Field Original Value New Value
        Description As said in the title, field autofocus should be done using the classical tapestry.js model, i.e. using Tapestry.init and() Tapestry.Initializer.Autofocus.

        Currently, the output produced looks like
        {code}
        $('textfield').activate();
        {code}

        It is Prototype specific and prevent from migrating to another JS library.
        As said in the title, field autofocus should be done using the classical tapestry.js model, i.e. using Tapestry.init() and Tapestry.Initializer.Autofocus .

        Currently, the output produced looks like
        $('textfield').activate();

        It is Prototype specific and prevent from migrating to another JS library.
        Hide
        Robin Komiwes added a comment - - edited

        I just created the patch and made a pull request on Github (branch tap5-994).
        http://github.com/robink/tapestry5/commit/7b351b7f2455d5c0e6e46c632c4ba59a54dea987

        Show
        Robin Komiwes added a comment - - edited I just created the patch and made a pull request on Github (branch tap5-994). http://github.com/robink/tapestry5/commit/7b351b7f2455d5c0e6e46c632c4ba59a54dea987
        Hide
        Andreas Andreou added a comment -

        patch looks fine - are there any other similar open issues?

        Cause it seems there's a pattern here, i.e. try to eliminate all
        $('foo') usages from java code.

        Show
        Andreas Andreou added a comment - patch looks fine - are there any other similar open issues? Cause it seems there's a pattern here, i.e. try to eliminate all $('foo') usages from java code.
        Hide
        Robin Komiwes added a comment -

        In fact, I'm currently working on this task, in order to make a full jQuery implementation of tapestry.js.
        As far as I know, this is the only reference I saw, but I will continue to investigate.

        Show
        Robin Komiwes added a comment - In fact, I'm currently working on this task, in order to make a full jQuery implementation of tapestry.js. As far as I know, this is the only reference I saw, but I will continue to investigate.
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Fix Version/s 5.2.0 [ 12314122 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Robin Komiwes
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development