Tapestry
  1. Tapestry
  2. TAPESTRY-2343

The FormInjector should copy its class attribute to the new element (on the client side)

    Details

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

      Description

      When the FormInjector duplicates its element, it should duplicate attributes as well. Particularly important is the CSS class attribute.

      Originally, this was supposed to copy all attributes except "id", but so far, haven't found a way to do that. Just copying the CSS class attribute is sufficient for my purposes.

        Activity

        Howard M. Lewis Ship created issue -
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Howard M. Lewis Ship added a comment -

        So far, I haven't seen a way to enumerate the attributes of an element in JavaScript. For the moment, we'll just copy over the CSS class (selfishly, that's the use case I personally need).

        Show
        Howard M. Lewis Ship added a comment - So far, I haven't seen a way to enumerate the attributes of an element in JavaScript. For the moment, we'll just copy over the CSS class (selfishly, that's the use case I personally need).
        Howard M. Lewis Ship made changes -
        Summary The FormInjector does not copy itself sufficiently on the client side, it should copy all of its attributes (except for id) as well The FormInjector should copy its class attribute to the new element (on the client side)
        Description When the FormInjector duplicates its element, it should duplicate attributes as well. Particularly important is the CSS class attribute. When the FormInjector duplicates its element, it should duplicate attributes as well. Particularly important is the CSS class attribute.

        Originally, this was supposed to copy all attributes except "id", but so far, haven't found a way to do that. Just copying the CSS class attribute is sufficient for my purposes.
        Howard M. Lewis Ship made changes -
        Fix Version/s 5.0.12 [ 12313048 ]
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        Hide
        Davor Hrg added a comment -

        this could help,
        I haven tested it on multiple browsers... or any browsers...

        quote:

        cloneNode(deepBoolean)

        Duplicates and returns a copy of the current node as a standalone node (not part of document tree). Cloning a node copies both the original's attributes and values, including the ID attribute, so be sure to alter the cloned ID attribute's value so it's unique before introducing it to the document tree. This method supports a single Boolean parameter, "deepBoolean" that when set to true, clones all the sub nodes of the current node as well, such as any text contained within.

        Show
        Davor Hrg added a comment - this could help, I haven tested it on multiple browsers... or any browsers... quote: cloneNode(deepBoolean) Duplicates and returns a copy of the current node as a standalone node (not part of document tree). Cloning a node copies both the original's attributes and values, including the ID attribute, so be sure to alter the cloned ID attribute's value so it's unique before introducing it to the document tree. This method supports a single Boolean parameter, "deepBoolean" that when set to true, clones all the sub nodes of the current node as well, such as any text contained within.
        Mark Thomas made changes -
        Workflow jira [ 12428718 ] Default workflow, editable Closed status [ 12568705 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568705 ] jira [ 12591731 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        5d 1h 2m 1 Howard M. Lewis Ship 15/Apr/08 18:30
        In Progress In Progress Closed Closed
        19m 14s 1 Howard M. Lewis Ship 15/Apr/08 18:49

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development