Tapestry
  1. Tapestry
  2. TAPESTRY-2397

Mixins inside components should have an id that extends from from the containing component, but is still unique and URL safe

    Details

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

      Description

      Currently, a mixin is "along for the ride" with a component and doesn't quite have its own unique id.

      This works for rendering just fine, but for more interesting cases its limiting:

      • If the mixin has persistent fields, there is the potential for conflicts with the component or other mixins that have persistent fields with the same name
      • If the mixin wishes to contribute a component action (to the FormSupport environmental) it ends up using the component's id, so the action will be applied to the container component, not the mixin

      Mixins should have an id that extends the container id; a separator character (perhaps '$') followed by the simple class name of the mixin, i.e., Index.border.form$mixin where "Index" is the page name, "border.form" is the component id path and "mixin" is the Mixin class name.

      The unique id is not necessary for the generation of URLs, as mixins are (in fact) "mixed in" to component event processing already.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        4d 7h 9m 1 Howard M. Lewis Ship 05/May/08 00:08
        In Progress In Progress Closed Closed
        18h 39m 1 Howard M. Lewis Ship 05/May/08 18:48
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568715 ] jira [ 12590112 ]
        Mark Thomas made changes -
        Workflow jira [ 12430115 ] Default workflow, editable Closed status [ 12568715 ]
        Howard M. Lewis Ship made changes -
        Fix Version/s 5.0.12 [ 12313048 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Howard M. Lewis Ship made changes -
        Description Currently, a mixin is "along for the ride" with a component and doesn't quite have its own unique id.

        This works for rendering just fine, but for more interesting cases its limiting:
        - If the mixin has persistent fields, there is the potential for conflicts with the component or other mixins that have persistent fields with the same name
        - If the mixin wishes to contibute a component action (to the FormSupport environmental) it ends up using the component's id, so the action will be applied to the container component, not the mixin
        - If the mixin wishes to generate an action request URL, it will generate a URL that targets the component not the mixin (this is ok because of how events propogate)

        Mixins should have an id that extends the container id; a separator character (perhaps '$') followed by the simple class name of the mixin, i.e., Index.border.form$mixin where "Index" is the page name, "border.form" is the component id path and "mixin" is the Mixin class name.
        Currently, a mixin is "along for the ride" with a component and doesn't quite have its own unique id.

        This works for rendering just fine, but for more interesting cases its limiting:
        - If the mixin has persistent fields, there is the potential for conflicts with the component or other mixins that have persistent fields with the same name
        - If the mixin wishes to contribute a component action (to the FormSupport environmental) it ends up using the component's id, so the action will be applied to the container component, not the mixin

        Mixins should have an id that extends the container id; a separator character (perhaps '$') followed by the simple class name of the mixin, i.e., Index.border.form$mixin where "Index" is the page name, "border.form" is the component id path and "mixin" is the Mixin class name.

        The unique id is not necessary for the generation of URLs, as mixins are (in fact) "mixed in" to component event processing already.
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development