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

Check component id against invalid chars ':' and empty IDs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4-RC2
    • 1.4-RC3
    • wicket
    • None

    Description

      Currently we are only testing a component id not to be null. However ':' and empty Ids are effectively invalid as well.

      Component.java coiuld be modified as follows:
      final void setId(final String id)
      {
      if (!(this instanceof Page))
      {
      if (Strings.isEmpty(id))

      { throw new WicketRuntimeException("Null or empty component ID's are not allowed."); }

      if (id.indexOf(':') != -1)

      { throw new WicketRuntimeException("The component ID must not contain ':' chars."); }

      }
      this.id = id;
      }

      Attachments

        Activity

          People

            jdonnerstag Juegen Donnerstag
            jdonnerstag Juegen Donnerstag
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: