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

Components resolved by an IComponentResolver fail to contribute to header via renderHead

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.5.4
    • None
    • wicket
    • Happens on all FireFox Chrome, IE
      Windows XP

    Description

      If a component is resolved via an IComponentResolver implementation then its overridden renderHead method never gets called.

      If the same component is added explicitly to its parent then its renderHead method is called.

      This is critical for us because we have markup variations that may or may not include certain panels. We thus leave the construction/adding of these panels to our IComponentResolver implementation because we can't explicitly add them because not all markup will require all panels.

      Class MyPanel extends Panel
      {

      /**

      • Write out necessary header markup.

      */

      @Override

      public void renderHead(IHeaderResponse response)

      { StringBuffer sb = new StringBuffer(); sb.append("<script src=\"/jquery.easing.1.3.min.js\"></script>"); sb.append("<script src=\"/trans-banner.min.js\"></script>"); response.renderString(sb.toString()); }

      }

      We aren't using any markup inheritance at the panel level.

      Attachments

        Issue Links

          Activity

            People

              ivaynberg Igor Vaynberg
              chrisc Chris Colman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: