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

Components inside an invisible <wicket:enclosure> are still rendered

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5-RC5.1
    • 1.5-RC6
    • wicket
    • None

    Description

      Consider this example:

      <wicket:enclosure child="invisible">
      This entire enclosure should be hidden.
      <p wicket:id="invisible"></p>
      <p wicket:id="shouldntrendereither"></p>
      </wicket:enclosure>

      If the "invisible" component is indeed invisible, then the entire enclosure is also invisible. Furthermore this implies that none of the components within the enclosure will be rendered. However this is not the case. Even though the "shouldntrendereither"
      component is in the same enclosure and therefore should not be rendered, Wicket attempts to render it.

      This was not the case in Wicket 1.4.x.

      See the attached quickstart.

      This is a serious problem for two reasons:

      1. For performance, it does not make sense to render components, and therefore potentially load model objects from the database, etc. if those components are ultimately not being displayed.

      2. In my experience, <wicket:enclosure> is used to hide components that would otherwise fail to render, due to non-existent data or unauthorized access. Pages that have been built under the assumption that hidden components are not rendered (a very reasonable assumption) may now fail with exceptions in Wicket 1.5.

      Attachments

        1. WICKET-3833-quickstart.tgz
          19 kB
          Matt Brictson
        2. WICKET-3833-2-quickstart.tgz
          20 kB
          Matt Brictson
        3. wicket-3833-2.patch
          18 kB
          Juegen Donnerstag
        4. wicket-3833.patch
          7 kB
          Juegen Donnerstag

        Activity

          People

            jdonnerstag Juegen Donnerstag
            mbrictson Matt Brictson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: