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

Add getPath to MarkupExceptions to aid in locatin affected components

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.4.10, 1.5-M1
    • 1.4.11, 1.5-M2.1
    • wicket
    • None

    Description

      Currently when a markup exception occurs it is in the format of:

      Component componentId must be applied to a tag of type 'select', not '<span wicket:id="input">' (line 0, column 0)

      The error message isn't very helpful when multiple components may have the same ID. This occurs primarily with repeaters.

      The change could take place in the Component class in the checkComponentTag/checkComponentTagAttribute method:

      findMarkupStream().throwMarkupException(
      "Component " + getId() + " must be applied to a tag of type '" + name + "', not " +
      tag.toUserDebugString()+" "+getPath());

      Attachments

        1. wicket-1.4.patch
          1 kB
          Peter Ertl
        2. wicket-1.5.patch
          1 kB
          Peter Ertl

        Activity

          People

            jthomerson Jeremy Thomerson
            checketts Clint Checketts
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified