Tapestry 5
  1. Tapestry 5
  2. TAP5-1708

Add ability to control where Ajax-injected CSS links are placed


    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.3
    • Fix Version/s: 5.3
    • Component/s: tapestry-core
    • Labels:


      JavaScriptSupport (and its predecessor, RenderSupport) was largely thought out in terms of linear page rendering, not piecemeal Ajax rendering. Unlike JavaScript which (if properly written) doesn't care about ordering, CSS is very ordering-centric.

      It is quite common for an application to include a CSS that overrides Tapestry defaults. Further, it is likely that certain components may want to have their own CSS to override defaults ... but an application CSS may also want to override those CSS rules as well.

      In an Ajax scenario, the component's CSS will be dynamically added to the page ... AFTER all existing CSS, including the theoretical application CSS that should be overriding the component CSS (theoretical in this discussion, actual in at least one of my clients).

      I think a first approach to resolving this would be to extend Tapestry so that a particular CSS link can be marked as the "insertion point". CSS added via Ajax would be inserted BEFORE the insertion point (if present) rather than at the end of the <head> element (as is done today).


        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 5.3 [ 12316024 ]
        Resolution Fixed [ 1 ]
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship created issue -


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


            • Created: