Wicket
  1. Wicket
  2. WICKET-4273

Rendering of resources in the header with dependency resolving and support for bundles

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.0-beta1
    • Fix Version/s: 6.0.0-beta1
    • Component/s: wicket
    • Labels:
      None

      Description

      The current API for resources does not allow resources to define dependencies nor does it provide native support for bundles. In short, a resource reference should be able to define that it requires other resources to be available as well, much like AbstractResourceDependentResourceReference does. This support should be part of ResourceReference itself and should not be limited to just references (anything that can be added to a header can be a dependency).

      Furthermore, many have requested support for resource bundles. A bundle combines several resources of the same type into one. When a bundle is rendered, all resources that are part of the bundle should not be rendered, otherwise you'll end up with duplicate resources. Although it is often requested that all resources should be combined into one (or two, a js and a css), I do not believe this is a good solution as there is no way of knowing which page requires which resources. In the worst case, this will cause every page to contain a different permutation of resources, requiring the user to download all resources again and again for every page. Therefore, the bundles require the developer to manually register bundles. If one resource from a bundle is required, the bundle will rendered instead.

      Finally, the default HeaderResponse renders many script tags for onDomReady and onLoad scripts. These scripts should be combined into one or two script tags.

      I'm currently working on implementing these features at Github. My progress can be found at https://github.com/papegaaij/wicket/tree/wicket+wiquery

      1. WICKET-4273.patch
        1.16 MB
        Emond Papegaaij

        Activity

        Emond Papegaaij created issue -
        Emond Papegaaij made changes -
        Field Original Value New Value
        Attachment WICKET-4273.patch [ 12507488 ]
        Emond Papegaaij made changes -
        Attachment WICKET-4273.patch [ 12507496 ]
        Emond Papegaaij made changes -
        Attachment WICKET-4273.patch [ 12507488 ]
        Martin Grigorov made changes -
        Assignee Martin Grigorov [ mgrigorov ]
        Martin Grigorov made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 6.0.0 [ 12315431 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Emond Papegaaij
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development