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

Invalid listener url generated for nested components that have an id which starts with a dash

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.5.0
    • 1.5.1
    • wicket
    • None

    Description

      I have a very simple hierarchy:

      WebMarkupContainer with id "-nav-container"
      nested RepeatingView with id "-nav"
      ... which contains a link with id "link"

      HTML:
      <div id="layout-nav" wicket:id="-nav-container">
      <ul>
      <li wicket:id="-nav"><a href="#" wicket:id="link"><span wicket:id="name">Tab name</span></a></li>
      </ul>
      </div>

      On page render I get a link like "wicket/page?3-1.ILinkListener--navcontainer--nav-1-link".
      When clicking this link I get:

      Could not find component 'nav-container:nav:1:link' on page x.y.Z

      Note the dash after -nav-container, which should not be there.
      Also note the missing dash before nav.

      It appears the dash shifts to the left in the encoding or decoding phase of the code that generates/handles a url for ILinkListener.INTERFACE.

      Removing the starting dash from the RepeatingView's id solves the problem.
      However, if this is considered normal behaviour (dashed not allowed in componend ids) it needs to be documented.

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            bgooren Sebastian Gooren
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: