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

Component.toString() is unsafe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2.2
    • 1.3.5
    • wicket
    • None

    Description

      I add a component to its container when the page is initialized, BEFORE
      it is rendered and before page model finished to initialize.
      if log4j is configured to enable wicket debug, the container toString()
      is called.
      This method invokes isVisible() of the container.
      I have overridden isVisible(), to query the page model before deciding
      whether the component is actually visible.
      I assumed this method is called when the component is rendered, and by
      that time the model is completely initialized.
      However, since it was called before component rendering, my code failed
      and the page failed to be created.
      To sum up, toString() of Component should be safe.

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            nilia Nili Adoram
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: