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

AjaxFallbackDefaultDataTable gives misleading error when fragment markup cannot be found

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 1.3.0-final
    • None
    • wicket-extensions
    • None

    Description

      If you call cellItem.add(new Fragment("foo","bar", myPage, model), but the fragment markup for "bar" isn't found in the markup for myPage, AjaxFallbackDefaultDataTable complains, "failed to add a
      component with id [cell] to the provided [cellItem] object." The error suggests making sure that cellItem.add was called.

      This error can be misleading, especially since cellItem.add was called. What really happened was the fragment with a given ID wasn't found, which should really have been an error in its own right.

      It would be nice if the error message gave a better description indicating the reason why the component failed to add (e.g., an error in handling the Fragment).

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            spatula Nick Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: