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

Inconsisting Handling of id mismatch on wicket:container

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4-M2
    • 1.4-RC2
    • wicket
    • None

    Description

      Given this simple case:

      public class Home extends WebPage {

      public Home()

      { add(new EmptyPanel("test")); }

      }

      and the following HTML page:

      <span wicket:id='test2'/>

      Please notice that the ids do not match.

      Executing this app will give the following Exception:

      WicketMessage: Unable to find component with id 'test2' in [Page class =
      com.myapp.wicket.Home, id = 0, version = 0]. This means that you declared
      wicket:id=test2 in your markup, but that you either did not add the
      component to your page at all, or that the hierarchy does not match.

      Whereas when using a wicket:container instead of a HTML tag, like this:

      <wicket:container wicket:id='test2'/>

      And when the ids doesn't match, Wicket throws the following exception:

      WicketMessage: Failed to handle: <wicket:container wicket:id='test2'/>

      Which is quite cryptic at the first glance.

      Original: http://mail-archives.apache.org/mod_mbox/wicket-dev/200803.mbox/%3c15908468.post@talk.nabble.com%3e

      We ran across same problem too.

      Attachments

        Activity

          People

            jdonnerstag Juegen Donnerstag
            slonopotamus Marat Radchenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: