Wicket
  1. Wicket
  2. WICKET-1275

FLAG_HAS_BEEN_RENDERED is set when rendering invisible components

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0-final
    • Fix Version/s: 1.3.1
    • Component/s: wicket
    • Labels:
      None

      Description

      I attached an example project so you can see exactly what the problem is. Just unzip, mvn eclipse:eclipse (or whatever) and import the project and run it.

      Basically I have a couple radio buttons and want to display different Palettes and other options based on the radio button picked. When I click on a radio button I get the following error:

      WicketMessage: Unable to find component with id 'recorder' in [MarkupContainer [Component id = options1Palette, page = wicketbug.Home, path = 10:form:container:options1Palette.Palette, isVisible = true, isVersioned = true]]. This means that you declared wicket:id=recorder in your markup, but that you either did not add the component to your page at all, or that the hierarchy does not match.
      [markup = jar:file:/home/jtoth/.m2/repository/org/apache/wicket/wicket-extensions/1.3.0/wicket-extensions-1.3.0.jar!/org/apache/wicket/extensions/markup/html/form/palette/Palette.html

      If you comment lines 73 and 74 in Home.java so the palettes are displayed from the start everything works fine.

      Let me know if you need anything else.

      Thanks!

      1. wicket-bug.zip
        14 kB
        Joseph Toth

        Activity

        Hide
        Igor Vaynberg added a comment -

        i tried to look into it, but ran out of time. matej can you take a look, youve actually tweaked the request target recently so maybe this is a regression.

        basically we never cascade the onbeforerender() to all children. we call component.preparerender() and that calls onbeforerender() but only on that component.

        this error happens because palette creates the recorder lazily in its onbeforerender callback, and since that is never invoked...

        Show
        Igor Vaynberg added a comment - i tried to look into it, but ran out of time. matej can you take a look, youve actually tweaked the request target recently so maybe this is a regression. basically we never cascade the onbeforerender() to all children. we call component.preparerender() and that calls onbeforerender() but only on that component. this error happens because palette creates the recorder lazily in its onbeforerender callback, and since that is never invoked...
        Hide
        Matej Knopp added a comment -

        Problem was in HAS_BEEN_RENDERED flag setting for invisible components. Fixing this fixed the quick start

        Show
        Matej Knopp added a comment - Problem was in HAS_BEEN_RENDERED flag setting for invisible components. Fixing this fixed the quick start

          People

          • Assignee:
            Matej Knopp
            Reporter:
            Joseph Toth
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development