Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4273

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


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


      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



            • Assignee:
              mgrigorov Martin Grigorov
              papegaaij Emond Papegaaij
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: